That happens on the server side and how the owner of the site configured it. Some sites would redirect you to the www subdomain. If you go to “example.com”, it (example.com) would redirect you to “www.example.com”. The www part is not assumed and not automatically added by your browser as is the case “with http”. And you can in fact have your server redirect connections to something other than the www subdomain or not redirect at all, you can also not have a www subdomain at all, but these are usually considered bad practices for public facing sites.
Comment on Where has the "www." gone?
Kolanaki@pawb.social 1 week agoIf you just entered “reddit.com” into the address bar, it will automatically assume the www. in front. If there’s another valid address such as “old.reddit.com,” you need to enter the prefix in place of www or it will just go to www.reddit.com.
Osan@lemmy.world 1 week ago
dev_null@lemmy.ml 1 week ago
No it won’t, it will go to “reddit.com”. Then Reddit will respond with a redirect to “www.reddit.com”. You can see that yourself in your browser’s developer console.
Kolanaki@pawb.social 1 week ago
I never said the browser does it.
dev_null@lemmy.ml 1 week ago
If you didn’t mean the browser, then I don’t see how this makes any sense:
What’s “it” here? It’s not the website since the address was not valid, and a website wouldn’t redirect you to a “www” if it wasn’t valid either and was going to result in a 404.