I have this site hosted on Openshift which doesn’t have a static IP address and only allows CName to be pointed on the site. My domain hosting is on Namecheap. My dns settings is the @(root) is pointed on the IP Address and the WWW record (cname) is pointed to the temporary hostname. My problem is when the IP changes, I cannot access my naked domain like test.com, the only accessible is www.test.com Which is hassle to change the settings every time the IP changes.
How can Cloudflare help me on this if I subscribe to their service?
I use www and naked domain CNAMEs for a static site I host at Amazon S3. My DNS listing here has a little blurb about CNAME flattening the naked domain. It works great!
CNAME or not, your mail server won’t work if your naked (root) domain is fronted by Cloudflare. Cloudflare won’t proxy mail connections. You would have to set your MX record to a subdomain and configure your mail server to work on that subdomain as well.
“As per my check, the domain is pointed to our basic nameservers. You can create the CNAME records for the sub-domain. In case you have a CNAME record configured for the @ (root domain), email will not work technically. CNAME has the highest priority and suppresses all other records for the hostname (including MX Records which are responsible for mail delivery). In case you need CNAME configured for your domain, you are welcome to set CNAME for www and use alternate configurations like A Record or Masked/Unmasked Redirect for @ hostname. You can find more information about CNAME at RFC 1034: Domain names - concepts and facilities”
My domain is hosted on Openshift which does not provide IP Address. They only allow CNAME which to be pointed to domain.rhcloud.com for both www and @
A CNAME at the root is not really a CNAME when it comes to Cloudflare. They actually do the CNAME lookup and return the IP address of that as an A record. Because all clients get the root returned as an A record, not the CNAME your defined, it does not over-ride other records such as MX, TXT etc as a real CNAME at the root would.
Note that this is a Cloudflare feature so this will not be the same if your DNS is held elsewhere (though some other providers do the same). See @sdayman’s link for more info.