[0] https://blog.cloudflare.com/introducing-cname-flattening-rfc...
[1] similar discussion, 2014: https://news.ycombinator.com/item?id=7293512
Fine if all you are doing is 302 to the www. Variant, but otherwise no.
With an extra caching key, this can even be cached.
Anycast addresses this issue, right?[1] Cloudflare uses Anycast for their IP addresses.[2]
[1] https://en.wikipedia.org/wiki/Anycast
[2] https://www.cloudflare.com/learning/cdn/glossary/anycast-net...
I discovered this when using a CNAME for a root-level domain and then wondering why I had spotty mail delivery. Turns out, quite a few mail systems and/or DNS resolvers handle this fine - but there are still quite a lot that don't.
- do I own the IP address(es), and BGP-route them to the machines in question?
- can I use any provider (who is willing to do the required configuration)? As a specific example, could I run anycast between two boxes purchased through Hetzner auction? (Translation: considering that I'm going fishing around in the auctions as opposed to other options, would I even be listened to? heh)
- who am I actually paying, and for what? (besides power, bandwidth, and possibly the server itself)
- ...how does anycast actually work _within the context of using it for hosting_? :/ https://en.wikipedia.org/wiki/Anycast is... distinctly not contextually-scoped to my intentions.
" One of the reasons why you need www or some other subdomain has to do with a quirk of DNS and the CNAME record.
Suppose for the purposes of this example that you are running a big site and contract out hosting to a CDN (Content Distribution Network) such as Akamai. What you typically do is set up the DNS record for your site as a CNAME to some akamai.com address. This gives the CDN the opportunity to supply an IP address that is close to the browser (in geographic or network terms). If you used an A record on your site, then you would not be able to offer this flexibility.
The quirk of the DNS is that if you have a CNAME record for a host name, you cannot have any other records for that same host. However, your top level domain example.com usually must have an NS and SOA record. Therefore, you cannot also add a CNAME record for example.com.
The use of www.example.com gives you the opportunity to use a CNAME for www that points to your CDN, while leaving the required NS and SOA records on example.com. The example.com record will usually also have an A record to point to a host that will redirect to www.example.com using an HTTP redirect."