0

Good Day!

Would just like to ask if this can be done. Doing a CloudFlare partial CNAME setup for a website (Since we cannot go the normal route and change the nameservers to CloudFlare's) problem is it cannot be done on the root level, only for subdomains (www and other subdomain). I'm ok with that except i'm just worried about the root domain.

  • A Record for root domain (domain.com) pointing to server IP
  • CNAME Record for www (www.domain.com) pointing to CloudFlare server then back to the server IP

    1. Can this be done and will this work properly? (I mean the A record for root, and CNAME record for www)
    2. If A record isn't added, what will happen if users go to domain.com and not www.domain.com?

The www isn't really a problem since it will surely go to CloudFlare's server, it's just the root domain I'm worried about (domain.com).

Sorry, fairly new with DNS management and I don't have a way of testing this as we are working on a live site.

Any help is appreciated. Thanks!

1
  • 2
    I don’t understand. Are you asking whether you can add an A record for the root domain? Also, what do you mean with a CNAME pointing to a CF server and “then back to” your server? Can you clearly describe what you are trying to accomplish here and why? That way we might be able to better assist you.
    – Tommiie
    Dec 11, 2018 at 5:19

1 Answer 1

0

Can this be done and will this work properly? (I mean the A record for root, and CNAME record for www)

  • www subdomain can be CNAME pointing to CloudFlare

  • root cannot be CNAMEd so A / AAAA records are only options. The question is if you don't wan't to point it to CloudFlare IP (in case you know it)

    • MX record can target e-mail delivery to other than "root" A TYPE

    • ssh access or other direct access can be pointed to some other subdomain for example direct.example.com which could point to "real server IP".

If A record isn't added, what will happen if users go to domain.com and not www.domain.com?

In case you will not set up A record it will work as a domain ( subdomains, MX,...) but in case somebody write the address to browser it will fail as non existing domain.

A Record for root domain (domain.com) pointing to server IP

Yes, this is ok. But in case you will point to the server directly think about setting up some (on resource) lightweight reverse proxy which would redirect (301 Move permanently or at least 302 Move temporary) to www subdomain and close the connection as soon as possible (to reduce impact of DoS / DDoS an utilize CF as much as possible).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .