Hacker News new | ask | show | jobs
by agraddy 1436 days ago
I'm a www advocate and reroute my domains from apex domain to www. When you use an apex domain, you have to use an A record which means if you have a server outage it is going to take time to update the record to point at a new IP address. If you use www with a CNAME, the final server IP can be quickly switched assuming you've set the CNAME and network up for that functionality - you can't do that with an apex domain.
1 comments

That doesn't make any sense at all - the CNAME just points to somewhere else with an A (and AAAA in $current_year) record. It adds another point you can switch around but doesn't let you switch it any quicker. How quickly you can effectively change what the domain points to is determined by the TTL of the record (withing limits) which can be lowered for any record.
Just saw this response. In my comment above, I didn't want to spend a lot of time responding to the original post so I handwaved a lot with this "assuming you've set the CNAME and network up for that functionality"

When you have a www you ultimately have more flexibility. For example, you can point a CNAME at another CNAME. This answer on ServerFault mentions the additional options (and downsides of doing that): https://serverfault.com/a/223634 https://serverfault.com/questions/223560/www-a-record-vs-cna...

Heroku vaguely mentions the benefits under the "Limitations" section of this link: https://devcenter.heroku.com/articles/apex-domains

After a DDos attack, they were much more explicit in their recommendations: "We strongly recommend against using root domains. Use a subdomain that can be CNAME aliased to proxy.heroku.com, and avoid ever manually entering IPs into your DNS configuration." https://web.archive.org/web/20110609095616/https://status.he...

Here is an old post about someone who initially used an apex domain and then had issues (that they hacked around): https://web.archive.org/web/20110718170757/http://blog.y3xz....

I believe that some larger providers are providing some work arounds which makes it easier to hack around the issue these days, but I still firmly believe that if you set your site up using "www" (even if it is initially an A record - most of mine are A records right now), you will have more flexibility in the long run than if you set your site up on an apex domain.