Canonical domain names
I'm interested in the trend toward websites using an apex (naked or root) domain instead of the www.
subdomain. I asked the Fediverse whether its users prefer or use the apex domain. Of the 17 respondents in the 24 hours the poll was up, 15 said they “prefer or use the apex/naked/root domain.”
Heroku provides a list of DNS providers with support for root domains through something other than an A record. On the same page, Heroku warns against using only an A record (at least where dynamic IP addresses are concerned). Notably, Cloudflare is the only provider with support for a “standard” CNAME record at the root; Cloudflare uses something called “CNAME Flattening” in order to support this feature.
I switched from Cloudflare to deSEC in November 2020. deSEC does not support aliases at the apex (i.e., either a subdomain or an A/AAAA record is required for websites). It's an open issue and eventual support is planned by deSEC. In fact, it'll be supported (at least in the API) as early as winter 2020.
The Domain Name System (DNS) and alias names
The Mastodon poll and upcoming support from deSEC for alias records somewhat change my thinking. I still think the website www. is not deprecated has interesting arguments (both technical and non-technical) in favor of using a www.
subdomain. The author argues, for example, that “it serves as a gentle reminder that there are other services than the Web on the Internet. Some of these, such as FTP and DNS, users typically use transparently without even realizing it.”
The main technical argument for a subdomain seems to be that traffic cannot be balanced between a hosting provider's servers (and respective IP addresses) if, for example, the server assigned to an A record is suddenly overwhelmed. In other words: Large sites probably require the redundancy made possible by an alias name (e.g., CNAME record). The hosting provider can then change the IP address of the alias without requiring changes to a customer's A/AAAA records.
Proactively monitoring the A/AAAA records and changing them immediately wouldn't necessarily solve the problem of caching by DNS resolvers. deSEC, for example, requires that DNS records have a minimum time-to-live (TTL) of one hour. Depending on the chosen TTL and whether the TTL is respected, it could take anywhere from a few minutes to a few days for the records to propogate fully. In that time, visitors will be directed to the old IP address (i.e., the overwhelmed server).
Cookies
The author of “www. is not deprecated” also mentions cookies under the technical reasons for using www.
This argument isn't relevant for my website because I don't need or use cookies. In short, however, the sharing of cookies between the root domain and any subdomains can be complicated.
www.ethanyoo.com
I don't know whether I'll end up switching my personal website from the subdomain https://www.ethanyoo.com to ethanyoo.com. I do know it's very unlikely I'll need load balancing for my personal website. The problem with shared hosting is that it's possible someone else's traffic might overwhelm the server. Assuming all is well with the IP addresses assigned, however, NearlyFreeSpeech.NET says using A/AAAA records “will typically be fine.” I could always wait until alias records at the root are available with deSEC.
I use the canonical name redirection feature from NearlyFreeSpeech.NET, meaning it's a simple setting to switch the canonical (primary) domain. Search engine bots might take some time to index a new canonical domain name, but the 301 redirect used by the setting should guide both them and human visitors to the “correct” URL.
Even though the server's settings will always redirect people to the canonical name, I want to avoid duplicate URLs in the results. As an end user, I think duplicate results look “messy.”
You can visit my personal website at ethanyoo.com.