This Weekend's DDoS Attack and What's in a (C)Name?
netlify.com
netlify.com
CNAME's guarentee the end users will always do at least 2 DNS lookups. Depending on their resolver config, this will mean they will likely hit 2 or more resolvers. This increases their chances of hitting a bad one and the DNS not resolving.
A records can be load balanced, have full fault tolerance and much more. The modern way to accomplish this is Anycast. Instead of relying on DNS for failover or load balancing, your IP is advertised in different parts of the internet and the traffic is sent to different datacenters, that each may have their own load balancers, caching devices, WAN accelerators, DDoS mitigation and more. In fact, nearly all major DNS providers are doing this today. While you may have 3 or 4 IP's in your zone, those IP's actually route to different places depending on the requestors location.
TL;DR: Summary, just use an A record for Apex or sub-domain, set a really high TTL so a DDoS of your DNS is less relevant and use Anycast to optimize your traffic routing, load balancing, latency to the end user and availability.
It's not really something you can do yourself either, unless you have assigned IP space and BGP in multiple locations.
I agree with your concerns around letting a CDN see traffic. In my workplace, we are not allowed to pass dynamic traffic through CDN's for that very concern that our customers share with you.
. is ICANN root
.com is VeriSign
example.com is Example Company LLC
www.example.com, subdivision.example.com, www2.example.com are all services, subdelegations and individual hosts within example.com
I realize this is a rapidly declining way to view the DNS but it is nevertheless the way it was designed.
sure it is helpful for organization, but when was the last time you used ssh.example.com?
RFC 1034[0] however, argues for a tree-based structure and lays emphasis on the value of branching. It being 'wrong' might have been too strong a description, how about it being 'improper'?
When I've seen SSH access being offered as a network service and not as a means to administrate other services on a network it's often been under names such as 'shell.example.com' - not exactly your 'ssh' label but an approximation.
There is real, measurable value to no-www. To anyone here who owns a public website, do visitors mainly go to the www or no-www version of your site? (assuming you don't redirect) Are the short or long versions of your URLs shared more?
I would be willing to bet there is a strong inverse correlation between link size and likelihood of being clicked. Anecdotally, on my own site of about ~1k daily active users, the no-www urls were used almost exclusively. Using www to avoid the rare disaster of DoS is unwise.
Citation needed.
> I would be willing to bet there is a strong inverse correlation between link size and likelihood of being clicked.
4 extra characters (www.) is a pretty small fraction of the total link length most of the time, when people link to individual blog posts or what have you. I'd argue that readability of the link is far more important, and www does not harm that.
The reason to not use www is in your logs.
> Anecdotally, on my own site of about ~1k daily
> active users, the no-www urls were used almost
> exclusively.
Not sure what this is supposed to prove. You should be redirecting one to the other, so it doesn't matter if people find it more convenient to manually type in one form over the other unless you're telling me you're trying to optimize out the redirect, which seems just as specialized as using www- for TFA's DDoS concerns.I type in "google.com" every time and don't care that it redirects me to "www.google.co.uk" every time. I don't even notice.
Visitors follow links - just checked netlify.com vs www.netlify.com and over the last 3 days around 0.5% of visits went to netlify.com instead of straight to www.netlify.com
It's generally far more important to setup your site to be as performant as possible and get the best uptime than to skip the the www - there are ways to get the best of both worlds however.
If your site is already heavily linked to at the apex version (or you prefer the no-www hostname for a shorter url or esthetics), then it's likely to take forever for a switch -- in this case, your realistic option is to set the nameserver records for the whole domain to whomever you want to do DNS load balancing for the apex.