Dec 4, 2026
visibility 98
star star star star star
(0 votes)

Setting Up Cloudflare Orange-to-Orange for Optimizely DXP Customers

Large Optimizely DXP customers can often run into complex firewall, caching, and bot management requirements that don't quite fit into what is available out of the box. Sometimes that means the client fully controls their own CDN and WAF, but that's not the only option. It doesn't have to be all or nothing.

Optimizely DXP has supported bringing your own Cloudflare zone for a while now, using what Cloudflare calls Orange-to-Orange (O2O). As a Cloudflare partner, we've done this for a few of our clients, and it is a really powerful setup. Here's the migration process we generally follow and some of what we've learned along the way.

How it works

At a high level, you can imagine Orange-to-Orange as two Cloudflare zones on top of each other. Your zone sits at the top, and below that you have the Cloudflare zone managed by Optimizely. Any configuration you make in your zone is applied first, and then the request falls through to Optimizely's zone. (Two proxied zones, two orange Cloudflare zones, hence the name.)

Cloudflare Orange-to-Orange diagram: customer zone in front of Optimizely DXP zone

So, if you have a feature configured or enabled in your Cloudflare zone, that feature setting will apply. If you don't have a feature configured in your zone, it stays at the level or settings Optimizely has it configured at.

Why do it?

You get so much more. You have full access to the analytics in Cloudflare, and with the Cloudflare MCP server you can have your AI of choice interrogate that data any way you please.

You can also create dashboards that show things like bot traffic on the website, login credential stuffing, and all kinds of other attacks that previously would have gone under the radar (other than maybe seeing something odd in App Insights). If you want to go even further, you can Logpush the edge logs somewhere and visualise them in Grafana as I did with the DXP edge logs beta.

Some of the other benefits of having your own zone:

  • Full API access. Anything you can do in the Cloudflare dashboard you can do with the API, so rules and settings can be scripted, version-controlled, or managed with Terraform. The MCP server also covers the whole API (not just analytics), so Claude can help set up and review rules too.
  • You can create and change custom WAF and rate-limiting rules whenever you need to.
  • Redirect rules at the edge instead of in code.
  • Cache rules, so you control what gets cached, for how long, and with which cache keys (more on caching below).
  • More modern compression. You can enable Zstandard (zstd) so browsers that support it get zstd and everything else falls back to Brotli or Gzip. No changes needed on the origin.
  • Bot Management gives you a bot score on every request that you can use in your WAF rules, and AI Crawl Control lets you decide which AI crawlers are allowed on the site.
  • Alerts and notifications for things like DDoS attacks and origin errors.

What about support?

Enabling O2O doesn't mean you lose any support or 24/7 incident response from Optimizely. If, for example, there's a DDoS attack against the DXP site that triggers downtime, Opti support will still be notified, and they will identify the traffic in their Cloudflare zone and deploy a rule to block it.

If your agency has 24/7 support and monitoring as we do, then it means teams can jump on attacks a lot quicker and spot patterns in traffic that go beyond blocking user agents.

Prerequisites

First, make sure your DXP hostname is set up correctly. You can follow the documentation here; basically, check the Hostnames tab in the DXP Management Portal, and the zone name should end with `dxp.optimizely.com`. If it doesn't, it's a support ticket to Optimizely to migrate the hostname to the DXP Cloudflare for SaaS zone first.

Everything needed to change the zone is done internally by Optimizely. They advised us there may be a few minutes of delayed requests during the change so we scheduled it for out-of-hours. However, we didn't notice any impact and Optimizely support completed the migration smoothly in about 30 minutes, in line with their timing advice.

Buying Cloudflare

Once the prerequisites are in place, you need to purchase the relevant Cloudflare package and work with a Cloudflare partner to do so, like Niteco 🙂.

The Cloudflare enterprise provisioning process means someone has to create a brand new free Cloudflare account, and that account ID is then given to Cloudflare's provisioning team who activate all the services paid for in the contract.

Cloudflare is moving towards packages, and you can reference the Externa packages page to see what is available. You will also need to know:

  1. How much bandwidth the existing Cloudflare zone on the Optimizely account has transferred in and out in the past month and year.
  2. The expected monthly page views and traffic numbers.

The Cloudflare sales team doesn't seem to have direct access to the stats for the existing Optimizely Cloudflare zone, so it's quicker to provide this information up front.

Migration

For the migration, we use a process something like this:

  1. Zone release - Optimizely's Cloudflare needs to release the hold they have on the domain so the new zone can be created in your Cloudflare account.
  2. DNS migration - Clone all the existing DNS records to your Cloudflare DNS.
  3. DNS cutover - Change the domain's name servers to Cloudflare's name servers. Keep all the Cloudflare DNS records grey cloud (proxy disabled, DNS only) for now.
  4. Baseline configuration - Based on our recommendations and best practice, we keep the initial setup light and quite friendly to traffic, to make sure the migration is smooth. That includes:
    • WAF custom rules, managed rules, and rate limiting
    • All required security settings
    • Bot and DDoS protection
    • Optimisation, speed, and cache tuning
    • AI Crawl Control
    • Alerts, notifications, and other custom rules and settings
    • We also ask Optimizely support to export (or screenshot) all the existing page rules and relevant configuration they have in their zone, which we then migrate to our zone. That way we have better visibility of all of the page and traffic rules in place for the client going forward.
  5. CNAME update - Update the CNAME record to the new value (`*.dxp.optimizely.com`) once the DNS records are migrated to Cloudflare.
  6. Go live - The final step is to enable the orange cloud (proxy) on the records in our zone that we want O2O activated for. Optimizely support said this may result in a temporary 1014 error that resolves itself after a few minutes, once the Cloudflare accounts are talking to each other. We haven't seen this and the cutover is usually smooth.

Congrats! You now have full* access to Cloudflare. *Not everything is supported with O2O. Things like Rocket Loader, Always Online, and WebSockets don't work, and Argo and Load Balancing only work on Optimizely's zone. You can check Cloudflare's O2O product compatibility list for exactly what is and isn't available.

Things to keep in mind

You now have caching in two Cloudflare zones. On deployments, you might need to purge the cache in the zone your client owns as well as the zone associated with the DXP. The DXP zone can be purged from the PaaS Portal, and for your own zone you can purge from the Cloudflare dashboard or set up API webhooks to do it automatically.

Carefully cross-check the error codes returned from your origin to the first Cloudflare zone, which is Optimizely's. We've had an instance where 404 errors were being cached in Optimizely's zone. After investigating, they found some settings needed to be changed in their zone to respect the origin headers for errors and pass those requests on to our zone instead of caching the error on their side.

Having Enterprise Cloudflare doesn't mean you can't use free Cloudflare limits for testing or validation. If your client needs to onboard additional domains that do something simple like a redirect, or that get low enough traffic to fit in the free tier, you can still run those side by side with the Enterprise domains in the same Cloudflare account.

How can Niteco help you?

Niteco is the largest global certified Optimizely CMS and Commerce partner, with deep expertise across the full Optimizely One platform. We are also a Cloudflare partner with deep expertise in CDN and WAF optimization.

Niteco is the largest global certified Optimizely CMS and Commerce partner, with deep expertise across the full Optimizely One platform. We are also a Cloudflare partner with deep expertise in CDN and WAF optimization.

If you would like to get the most out of your Optimizely DXP platform or get your own Cloudflare Orange-to-Orange setup, get in touch.

Dec 04, 2026

Comments

error Please login to comment.
Latest blogs
How to Fetch CMP DAM Listing Cards in Optimizely CMS 12 Using GraphQL

Introduction In an existing Optimizely CMS 12 application, listing cards are typically populated using CMS content retrieved through the existing...

Deepmala S | Dec 3, 2026

Which environment am I in? Adding an environment badge to Optimizely CMS 13

Sometimes it’s hard to keep track of which environment you’re working in. Development, Integration, Preproduction and Production all look pretty mu...

Pär Wissmark | Dec 2, 2026 |

Hiring Your First AI Teammate: What Optimizely's Virtual Teammates Mean for the Marketing Org Chart

The coworker who never needs the brief twice How many times this week did you paste the same context into an AI tool? Brand voice, the target...

Leonardo Bravo | Dec 2, 2026