How to use Cloudflare's CDN while we can not change nameservers on WIX

We have a website on WIX (www.example.com). The domain name and name servers are all on WIX. Using the same domain name we have another website (buy.example.com) which is NOT on WIX. The "A record" of both "WWW" and "BUY" are set on WIX's DNS. Recently we would like to change the name server to Cloudflare(CF) but found that it is not supported. The question is what we can do to utilize the advantages of CF on buy.example.com?

One method come to my mind is to, upon users visiting buy.example.com, redirect immediately the link to buy.example2.com, which uses CF's DNS. The redirection might be done via PHP or Apache settings on the server where the site buy.example.com physically is.

Would this be a feasible workaround that can achieve the goal of using CDN and other CF's features?

Could you please provide us with some clues?


I'm not quite sure if WIX will support this, but technically what you're trying to achieve is to delegate the subdomain zone buy.example.com. to Cloudflare, while keeping your root zone example.com. on WIX.

This seems to be supported by Cloudflare but requires you to a) pay for a business account and b) create the root zone in Cloudflare and then contacting CF Support, so it seems to be a bit of a workaround from CF's side.

Another option is to completely migrate your DNS services to Cloudflare, and then use something WIX calls "pointing" to set up the DNS records in Cloudflare to WIX. This is a lot cleaner approach, and also has the added benefit of being free. Then you can manage all you DNS settings in Cloudflare, which I would imagine does DNS a lot better than WIX.


First, I hope you are not trying to use Cloudflare as a CDN for WIX pages as their site says this is not supported https://support.wix.com/en/article/request-cloudflare-support

But there could be some workarounds....

If you want to use CF for other parts of your site on different subdomains, the easiest way (and maybe the only way) is to put your primary domain there -- example.com. Then, you should be able to either (1) point to WIX for your main website (www subdomain) by adding in the appropriate WIX IP address in cloudflare DNS, or (2) delegate your www domain in Cloudflare DNS to manage via WIX DNS.

Normally, people delegate a whole domain to one DNS provider via their domain registrar, but you CAN just delegate a subdomain and manage it via a second DNS provider. In this case, WWW... which really is a subdomain even though many people think of it almost as synonymous with the base domain. It's not. WWW is a subdomain like any other.

You would then redirect the base domain (example.com) to www.example.com in cloudflare DNS. Otherwise, all the WWW settings would be handled at WIX.

Then, you have access to the full suite of features at Cloudflare for anything ELSE on your domain.

If you want to cache photos on cloudflare CDN, and use them on WIX or anywhere else, then create images.cloudflare.com, point that somewhere you host your images (you may not be able to use WIX for this), and turn on the orange cloud. And voila... you have images via Cloudflare's CDN.

Are you trying to use the anti-bot and other firewall tools at Cloudflare? Here's how you can do it even if WIX says they cannot work with CF...

Basically you would need to setup a simple page on a subdomain of example.com. Then, you need to redirect any traffic you want to filter through this subdomain where you will enable cloudflare.

The only function of this subdomain is to redirect the user to where you REALLY want them to go. But you turn on the "proxy" (orange cloud in cloudflare) on this subdomain... this also enables the Cloudflare firewall (and capthca/browser check challenges). Then people cannot get to the redirect unless they go through cloudflare first.

I know this sounds confusing so let me try to give an example We will use WIX as the subdomain for your main site for clarity but you can change this to home, xyz, even www... although I am thinking it may be convenient to use www for cloudflare:

  1. move your DNS to cloudflare at your domain registrar
  2. redirect example.com to www.example.com
  3. delegate wix.example.com to WIX DNS for management of your main site.
  4. setup a subdomain in Cloudflare of www and turn on the "orange cloud"
  5. create a 301 or 302 redirect method to send anyone who lands on www.example.com to wix.example.com (check out cloudflare workers... maybe they will be perfect for this)
  6. turn on the cloudflare firewall rules you want to use

Now, everyone who goes to example.com or www.example.com will go through the cloudflare firewall!

The flow is: example.com ==> [cloudflare screening] ==> www.example.com ==> wix.example.com

The cloudflare screening step is automatic before the user will be served your redirect at www.example.com. If they fail the screening, they are blocked (on this path only). A user can also just type www.example.com and they will be screened by CF using this setup.

This should not affect your WIX site at all. You will need to figure out a method to force anyone who doesn't come through WWW to go back through there.... maybe some javascript to check if they have a cloudflare cookie and if not, redirect them to your "front door" at www.example.com.

I hope this is helpful to you. Please be sure to mark this as a solution or upvote this answer if you do find it useful. Thanks!