Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using DNSimple and S3/Cloudfront.

Following their recommended configuration looks like this:

myapex.com ------ REDIRECT --> www.myapex.com
www.myapex.com -- CNAME -----> lkj32lkj323323.cloudfront.net

This is all bacon gravy.

I'm about to make the change though, and I got nervous because I have a lot of existing MX records. They all point to Google services though, as we use Google for our email. Am I likely to break email or other services by removing an old A record? Do MX records do something special with the zone apex or A record?

share|improve this question
up vote 5 down vote accepted

They all point to Google services though, as we use Google for our email. Am I likely to break email or other services by removing an old A record?

If your MX records remain pointed to the Google mail server hosts, then you should be fine, providing that your nameservers are reachable and DNS table contains those MX records.

As far as other "services", that really depends on if they're A records or CNAME records, and where they point to. CNAME records point to hostnames, and A records point hostnames to IP addresses. So if you update or change the IP address of a hostname in an A record, the CNAME that points to them will resolve to the new IP address of the hostname. If you remove an A record for a hostname that a CNAME points to, then it will no longer resolve.

share|improve this answer
Very helpful, thank you. All my CNAME records are mapped elsewhere. Now I just have some legacy A records that are pointed at subdomains. For example, I have 01.sendmail.mydomain.com with an A record hanging around. Will a redirect for mydomain.com interfere with that? – SimplGy Sep 5 '13 at 1:33
No problem. I'm not sure I completely follow, but "redirects" are done at the web server-level (e.g., 301 redirects), and A records are at the DNS-level (before it reaches the web server). So if you have an A record pointing a subdomain somewhere, it shouldn't be impacted if the root domain is redirected elsewhere. – dan Sep 5 '13 at 1:49
That's what I thought, too--I usually do redirects in Apache or at the application level, but DNSimple and others have what they call a "URL" record. It's a 301 redirect they say. I'm not sure how it's actually implemented. – SimplGy Sep 5 '13 at 3:40
For all who may follow, turns out an A record is resolved before a 301 or URL record. I had an old A record and a URL or redirect record and the A record was winning until I removed it. – SimplGy Sep 5 '13 at 11:41
Yes, a URL record is DNSimple's term for an HTTP redirect, which is a 301 redirect - see this link. As commented above, an A record will be resolved before reaching a web server redirect. – dan Sep 5 '13 at 14:54

Do MX records do something special with the zone apex or A record?

Your record for the root of your domain (myapex.com in your case) cannot be a CNAME record. It should be an A record. If this specific record is a CNAME record, mail will not be delivered to your MX records, rather it will be delivered to the MX records of where that CNAME points.

Other A records (to sub-domains) can be removed safely without affecting mail delivery or MX records.

Many CDN and load balancing services require that DNS record for your site be a CNAME to their DNS. If you want to host your website without a www then this can be a problem. I've been using Amazon Route 53 DNS services for this which introduce a new "Alias" type of DNS records where you specify the external name (like a CNAME) but they look up the address periodically and serve an IP address (A record): http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/CreatingAliasRRSets.html

share|improve this answer
My first CDN experience is exactly why I'm learning all this. The solution I've been told is to 301 the apex to www and cname your www to your CDN. I have implemented this and it works well. – SimplGy Sep 5 '13 at 11:39
Specifically, you would need to have an A record pointing to a web server that performs a redirect. I personally don't like the "www" in my URLs, so this particular work-around pains me. – Stephen Ostermiller Sep 5 '13 at 12:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.