No Static Public IP


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, the only accessible is Which is hassle to change the settings every time the IP changes.

How can Cloud Flare 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!


How does CNAME work on the root @ record if you have a mail server. As far as I know it will not work if you have MX record pointing on the @ record.


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.


That’s not exactly true. :slight_smile:

If Cloudflare is hosting your DNS even is you CNAME at root (w/ came flattening as you point out)

e.g. Mx for shouldn’t be

The Mx for could be or

Some other providers support ANAME which is basically the same thing and I believe also supports having an Mx record for it.


By how the MX record was described, it sounded like it’s not a separate subdomain for the mail server:

As far as I know it will not work if you have MX record pointing on the @ record.


Here’s what my current hosting support says.

“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

My domain is hosted on Openshift which does not provide IP Address. They only allow CNAME which to be pointed to for both www and @

I created CNAME for www and @ which points to and URL Redirect for @ with value of The problem is If I typed naked domain, it’s not accessible but if I type it’s accessible.


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.

closed #9

This topic was automatically closed after 14 days. New replies are no longer allowed.