this post was submitted on 05 May 2025
217 points (95.8% liked)

Technology

69771 readers
4935 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related news or articles.
  3. Be excellent to each other!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, this includes using AI responses and summaries. To ask if your bot can be added please contact a mod.
  9. Check for duplicates before posting, duplicates may be removed
  10. Accounts 7 days and younger will have their posts automatically removed.

Approved Bots


founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[โ€“] palordrolap@fedia.io 24 points 1 day ago (1 children)

There's another, more DNS-related, reason why it was usually preferred to have something before the domain part. It's possible to alias a subdomain to another subdomain, but not so with the root of a domain, which must point directly at a single IP address.

If your IP addresses are more subject to change than your hostnames, or your site was hosted on a third party service, then it made sense to point www at a particular hostname rather than its address. e.g. you might point www.your-domain-here.biz at a-hostname.the-hosting-provider.tld. That's not possible with a root domain. IP address or nothing.

Similarly, it's possible to point a subdomain at multiple IP addresses (or multiple hostnames) at the same time, which was a cheap way to do load balancing. i.e. For a site a user hadn't visited before, they'd be basically told one of the listed IP addresses at random, and then their local DNS cache would return that one IP address until it expired, generally giving enough time for the visitor to do what they wanted. Slap 8 different IPs in the www subdomain and you'd split your visitors across 8 different servers.

Root domain has no such capability.

Technically it would be possible to do all of that one level higher in DNS where your domain itself is the subdomain, but good luck getting a domain registry to do that for you.

I haven't done DNS in over a decade at this point, so things may have changed in the intervening years, but this was all definitely a thing once upon a time.

[โ€“] Max_P@lemmy.max-p.me 14 points 1 day ago

You can return multiple A/AAAA records for the root, the TLD delegates the whole thing to your nameservers and it's free to return whatever you want. Registrars actually do let you set records on the TLD's zone, it's called glue records and they're typically used to solve the nameserver chicken and egg problem where you might want to be your own nameservers. Mine's set that way:

~ $ drill NS max-p.me
;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 32318
;; flags: qr rd ra ; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;; max-p.me.    IN      NS

;; ANSWER SECTION:
max-p.me.       3600    IN      NS      ns2.max-p.me.
max-p.me.       3600    IN      NS      ns1.max-p.me.

The me registrar will give you the IP for those two so you can then ask my server for where max-p.me really is.

The bigger issue is usually there's a bunch of stuff under your root domain like MX records, TXT records, potentially subdomains. That's a huge problem if you need to CNAME the root to a hosting provider, as the CNAME will forward the entire domain including MX and TXT records. Cloudflare sort of works around that with server side flattening of CNAMEs, but that's not standard. But if you have a www subdomain, then it's a complete non-issue. And really, do you want to delegate your MX records to WP Engine?

The main reason people went without the www is the good old "it looks cooler and shorter" while ignoring all the technical challenges its brings, and that's probably why browsers now hide the www so that website designers don't have to do this atrocity.