Domain mapping with cloudflare

Hi, what´s the best solution of setting up and managing multisite users domain, so that they also can be connected to cloudflare?

The main domain are using cloudflare name servers and are pointing to the server ip adress. Should I host the other domains on my server and use cloudflare nameservers, and point them back to the server and the wpmudev domain mapping plugin will take care of the rest?

This is really making my head spin. I would be grateful if someone finds a simple solution for this. The easier it is for the client the better :smiley:

  • Kasia Swiderska
    • Support nomad

    Hello Christoffer,

    Let me give you summarized idea about how Domain Mapping works. First you need to have a dedicated IP for your server and it should point to your main site if anyone enters the IP in browser. For example, your dedicated IP is “” and your main site is “”. So your server has to be set up in such a way that when anyone enter “” in the browser, it will open “”.

    Now suppose, you have a subdomain “” and you purchased a domain (lets say So you should create an A record in “” DNS Settings pointing to your dedicated IP, so when someone goes to “”, they are pointed to “” and it will eventually open “”.

    Now if you map your domain, it will work. Because when you will go to “”, it will take you to “”, and as the domain is mapped, “” already knows which subsite to server as the request came from “”.

    Procedure is almost same if you are using Cloudflare. In that case, you add Cloudflare nameservers in your Domain Control Panel DNS, and then set the A record in “Cloudflare DNS Settings”.

    Please let us know if you still have any confusion. We will be glad to help.

    kind regards,


  • Christoffer
    • Site Builder, Child of Zeus

    Thank you Kasia, GREAT! That clears my head. Making this a practical example, I can just tell my clients to point their domain to the cloudflare nameservers, no matter if we or them host the domain. I will then point the domain to the ip and it should work?

    And I would probably need to host the domain so that we can setup their email accounts, if they have no idea how to do that.

  • Nithin
    • Support Wizard

    Hi Christoffer,

    Hope you are doing good today. :slight_smile:

    Making this a practical example, I can just tell my clients to point their domain to the cloudflare nameservers, no matter if we or them host the domain. I will then point the domain to the ip and it should work?

    Yes, that sounds good. Create a A record/CNAME in cloudflare, and point it to your host. And let your users point main DNS to cloudflare nameservers.

    I hope this helps. Please let us know if you still need any further assistance. Have a nice day. :slight_smile:

    Kind Regards,


  • Christoffer
    • Site Builder, Child of Zeus

    I can´t get this to work, this is my setup: (dedicated ip), nameservers points to cloudflare, cloudflare points to back to the server. has a mapped domain “” on a different registrar-host, the domain is mapped via the domain mapping plugin. nameservers points to cloudflare, and cloudflare points back to dedicated ip with a A and a www record.

    Browsing to results to this page: “Default website page”

  • Christoffer
    • Site Builder, Child of Zeus

    Hello. Yes I´ve added the correct nameservers. Try to search with whois. Do I need to add the domain as an alias or parked domain, before it can have the mx and a records? Adding the domain as an alias:

    There was an error when the system attempted to create the alias. Park::park( failed: (XID c84x7m) Sorry, the domain is already pointed to an IP address that does not appear to use DNS servers associated with this server. Please transfer the domain to this servers nameservers or have your administrator add one of its nameservers to /etc/ips.remotedns and make the proper A entries on that remote nameserver.

  • Kasia Swiderska
    • Support nomad

    Hello Christoffer,

    I’m checking your domain in and it tells me that Domain Name Servers are

    When I try to reach that domain in Chrome I’m getting DNS_PROBE_FINISHED_BAD_CONFIG

    I will check with our Domain mapping expert if we are missing here anything and I will let you know.

    kind regards,


  • Rupok
    • Support Ninja

    Hi Christoffer,

    Sorry for the inconvenience you are having. Let me tell you the optimum process for using Cloudflare with Domain Mapping. From what I see above, I believe your setup is almost correct, maybe just a simple step is left. Let me describe the process firs.

    1. Suppose your main site is “”, it’s hosted on “” dedicated IP, it has a subsite “”, and you are trying to map “” to “”. I believe, we are on the same page up to this.

    2. Now at first, you need to point “” to Cloudflare, using Cloudflare nameservers. So when you go to “”, your request will be forwarded to Cloudflare.

    3. In your cloudflare, you should first add “” and then set A record pointing to “” so when requests comes to Cloudflare, it forwards your request to your server.

    4. Now, when Cloudflare forwards requests from “” to your server, your server gets those request but your server doesn’t know what to serve against this request. Normally when you have dedicated IP, hitting your IP opens up the main site, but on your server, you are using cPanel and when hitting your IP (31.***.***.2), it doesn’t open your main site, rather cPanel default page opens. That means, now you need to add “” to your cPanel as “Addon” domain and set the root folder of your main site as the location of this addon domain. When you do this successfully, your server cPanel will know what to serve (it will serve the main site, because you set the root directory of your main site for your addon domain – when requests come from Cloudflare regarding “”.

    5. When you main site gets the request from “”, it will serve “” because it knows which subsite is mapped to which site.

    N.B. Cloudflare says:

    Define the wildcard subdomains in your DNS zone file during the signup process. CloudFlare cannot proxy wildcard DNS entries, so to benefit from CloudFlare performance and security, you must explicitly define any entries in your zone file as either CNAMEs or A record entries.

    Note: Having a proxy run over wildcard entries is available only at the Enterprise tier of service. The information above is related to customers on other CloudFlare plans.

    It means, when you have a subdomain multisite, you have to add each subdomain in Cloudflare DNS settings as CNAME because Cloudflare doesn’t proxy wildcard subdomain. This is also a very important fact here.

    This is the total workflow. Now if you think, this will be very complex for you, I can try to fix the whole thing for you, but for doing that, I’ll need your cPanel access, your Cloudflare access, and your Domain Control Panel (I found your mapped domain was bought from access. Can you send me message with above access credentials through our secure contact form here: so I can try to fix this for you?

    Subject: “Attn: Rupok”

    – cPanel Username

    – cPanel Password

    – cPanel Login URL

    – Cloudflare Username

    – Cloudflare Password

    – Cloudflare Login URL

    – United Domains Username

    – United Domains Password

    – United Domains Login URL

    – Link back to this thread for reference

    – Any other relevant URLs

    Select “I have a different question” for your topic. This and the subject line ensure that it gets assigned to me.

    Please confirm here when you are done sending. I’ll report you all the changes I have to make to fix this so you can know how this was fixed.

    I’m looking forward to hear from you and resolve this issue as soon as possible.

    Have a nice day. Cheers!


  • Bryant
    • The Crimson Coder

    Christoffer I hope this information helps. We are trying to do the same thing and what we have come up with is using whmcs and cloudflare to provision our sites (we have tried many different solutions). Cloudflare has a plugin for whmcs that will do pretty much what you are trying to do, which I am assuming is 1) assign your users a cloudflare account, 2) route their domain to cloudflare dns, 3) use cloudflare flexable ssl.

    You will have to sign-up for a cloudflare partner account, but that takes 2 min. Then you just have to wait for them to respond. In total it took us about half a day to get whmcs set and provisioning sites with domain mapping.

    We have tried other options, but this seems to be the best option so far.

  • Pradyumna
    • New Recruit

    It’s a greate discussion, as per best of my knowledge If a user want to use cloudflare for his domain then he needs to sign up for a free cloudflare account and change the name server. But here what I want if it can be automated from the user dashboard where user will just change the NS at the domain provider and the balance work will done automatically ( add the domain in cloudflare (under multisite owner cloudflare account) and A record change) no user account creation at cloudflare or setup.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.