No Static Public IP


#1

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 Cloud Flare help me on this if I subscribe to their service?


#2

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!


#3

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.


#4

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.


#5

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 example.com shouldn’t be example.com

The Mx for example.com could be mail.example.com or something.somemailhost.com

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


#6

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.


#7

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 http://tools.ietf.org/html/rfc1034

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 @

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


#8

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.


#9

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