having little trouble setting up Domain mapping with

Hi, having little trouble setting up Domain mapping with cloudflare.

1. In Domain mapping configuration, when I need to enter Server IP Address: Do I enter my dedicated server IP aadress or the ones that plugin recommends and they belong to cloudflare. It shows 2 cloudflare IP-s

2. When domain mapping as a user I have https://domain.com/test5/. When I go to map domain from that site, what configuration do I need to have on my DNS records?

For example I have domain example.com. Now I want to see content from https://domain.com/test5/ when I go to example.com
Do I need to get rid of everything and only keep A record?
And if so, which IP do I enter in the A record, the dedicated IP or one of the 2 cloudflare IP-s?


  • Margus

    Sad to say not. I turned off verification and now was able to add the domain but still get "invalid" Health status.

    I also added two A records but when accessing domain, I get redirected to cloudflare site:

    Error 1001
    DNS resolution error
    What happened?

    You've requested a page on a website that is on the CloudFlare network. CloudFlare is currently unable to resolve your requested domain. There are two potential causes of this:

    Most likely: if the owner just signed up for CloudFlare it can take a few minutes for the website's information to be distributed to our global network.
    Less likely: something is wrong with this site's configuration. Usually this happens when accounts have been signed up with a partner organization (e.g., a hosting provider) and the provider's DNS fails.

    Has anyone else here set up cloudflare succesfully?

    • wp.network

      Hey @Margus I'm pretty good with CloudFlare =)

      Lets start with some basics.

      1) You seem to be saying that your primary domain is set up through CloudFlare and is using https is that correct?
      1a) If you are enforcing https either at server or with Domain Mapping options (and imho you should be) you also should have CF set to use at least 'SSL Full' for your network primary domain - is this set?
      1b) have you perhaps tried using CF features (like custom page rules) to enforce https?

      2) at network > settings > domain mapping you will enter your server IP not the CF IPs

      3) the article you mention below re. 'CNAME Flattening' at CF is actually a key bit! Good job on picking it out even if you don't fully understand it yet!! 'CNAME Flattening' is CF's name for what another company (DNSMadeEasy) calls an 'ANAME' ... in both cases they are talking about being able to set a DNS record for the apex domain (the 'bare' domain without any subdomains) that uses a name value (eg. networkprimary.tld) instead of the standard IP value (eg. 123.456.78.9)... this is huge because among other things, it lets you set all your mapped domains to use your network primary instead of using your IP (which means its really, really easy to move your server/IP at need!)... so, the Q becomes: are you running your mapped domains through CF as well as your primary?

      3a) If you try running a mapped domain through CF, then you can get away with only three records:

      A localhost
      CNAME @ networkprimary.tld
      CNAME www mappeddomain.tld

      Your Network Primary then really only needs:

      A localhost
      A @ 123.456.78.9
      CNAME www networkprimary.tld

      3b) If you are using CF & https at primary and try also using https for mapped domains through CF, mapped domains need to also be set to use at least 'SSL Full' at CF

      Let me know how your answers/results and I'll try to offer any assists I can as you and Jack work through this =)

      Cheers, Max

  • Margus

    Ehh, been at it the whole day and still not smarter. Google is empty :slight_smile:

    I'll try to break it down, maybe someone can spot the mistakes.

    My multisite has nameservers from the registrar


    This means that whoever goes to my https://multisiteurl.com get's redirected to cloudflare.

    Now cloudflare has my multisite DNS

    points to 104.XXX.XXX.229

    is an alias of multisiteurl.com

    mail handled by mx2.zohomail.com
    with priority 20

    mail handled by mx.zohomail.com
    with priority 10

    Now I keep my server on digitalocean where I also have DNS:

    $ORIGIN multisiteurl.com.
    $TTL 1800
    multisiteurl.com. IN SOA ns1.digitalocean.com. hostmaster.multisiteurl.com. 1420803173 10800 3600 604800 1800
    http://www.multisiteurl.com. 1800 IN CNAME multisiteurl.com.
    multisiteurl.com. 1800 IN MX 10 mx.zohomail.com.
    multisiteurl.com. 1800 IN MX 20 mx2.zohomail.com.
    zmverify.zoho.com.multisiteurl.com. 1800 IN CNAME zb45678103.multisiteurl.com.
    multisiteurl.com. 1800 IN A 104.XXX.XXX.229

    Not sure if this last DNS has any effect at all, as I tried with different server (without SSL and cloudflare) and dedicated IP and everything worked.

    So this above is my multisite (using subfolder) setup.

    Now to map a domain.

    Let's say I have multisiteurl.com/user23 and I want it to be http//www.newsite.com

    I go to domain registrar and enter this DNS?

    $TTL 3600
    newsite.com. IN SOA ns.zone.eu. hostmaster.zone.eu. (
    2015011310 ; serial
    10800 ; refresh, seconds
    3600 ; retry, seconds
    604800 ; expire, seconds
    3600) ; minimum TTL, seconds

    ; 3 NS record(s)
    newsite.com. IN NS ns.zone.eu.
    newsite.com. IN NS ns2.zone.ee.
    newsite.com. IN NS ns3.zonedata.net.

    ; 0 MX record(s)

    ; 1 A/AAAA record(s)
    newsite.com. IN A 104.XX.2.XX
    newsite.com. IN A 104.XX.3.XX

    ; 1 CNAME record(s)
    http://www.newsite.com. IN CNAME newsite.com.

    ; 0 SRV record(s)

    ; 0 TXT record(s)

    The A records are the Cloudflare Server IP Addresses that domain mapping plugin said it was able to fetch and suggested I use.

    No matter how I try, I always get the same error mentioned in my previous post from cloudflare.

    I did find something like this http://www.higherorderheroku.com/articles/cloudflare-dns-heroku/ and https://blog.cloudflare.com/introducing-cname-flattening-rfc-compliant-cnames-at-a-domains-root/ that talks about CNAME flattening but have no clue what it means.

    Any kind of information would be greatly appreciated as there is practically no information on the web and Cloudflare support won't answer either.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.