Every website used to be like “www.example.com”. Now I rarely encounter this “www.”. Why did it even exist and where has it gone? I also used to run into websites with legitimate domains, but “ww1.” instead of “www.”, these were probably phishing sites, but how did this actually work on top of legitimate domains?
Hey something I can answer!
TLDR: Because most owners of domains want their emails to have the same root (e.g.: bobby@acme.com as the email and acme.com as the website)
TLDR word salad: RFC rules restricts root domain CNAME records from coexisting with other DNS record types. Early internet bypassed this by pointing the website to subdomain www.example.com with a CNAME record; while hosting MX record at the root example.com Modern dns services have CNAME flattening which dynamically responds to an A record query at the root example.com with multiple ips
Also DNS is complicated
Some of the comments here describe the results of what happened but do not touch on the reason behind why www was common and why it is not anymore
The reason is very boring: because the rules say so. Specifically https://www.rfc-editor.org/info/rfc1034/ “If a CNAME RR is present at a node, no other data should be present; this ensures that the data for a canonical name and its liases cannot be different.”
To discuss this further we need to breakdown what is part of the url in the first place so we don’t mix things up. e.g. https://www.google.com/
https --> specifies the protocol here its http encrypted over TLS (SSL if your old)
: --> separates the protocol from the rest of the url
// --> fun hold over https://archive.nytimes.com/bits.blogs.nytimes.com/2009/10/12/the-webs-inventor-regrets-one-small-thing
www --> subdomain
google.com --> root domain
.com --> top level domain https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains
Now for some common DNS address types you are probably already familiar with are
A records (amazon.com translates to ipv4 98.87.170.71)
AAAA records (google.com translates to ipv6 2607:f8b0:4004:c1f::71)
MX record (tells where your email goes to)
CNAME record (points to another DNS record name - usually an A record)
So why does a domain restriction on CNAME interfere with a website?
Because most owners of domains want their emails to have the same root.
And the rules do not allow for the root domain name to have both a CNAME and a MX record
For example, to have bob@amazon.com work.
A top level MX record for amazon.com must be published.
If an MX record for amazon.com exists CNAME can not exist.
So in the early days of the internet, a compromise standard was made.
MX records live at the root (eg: amazon.com) to direct mail for bob@amazon.com
CNAME records live at www. subdomain (eg: www.amazon.com) to direct web traffic
Why not just drop the CNAME at the root?
Use MX for mail at the root and A record at the root for website!
This will work perfectly fine actually. There’s nothing functionally wrong with this.
In fact you can have your root A record round robin to several ips.
So your traffic can be roughly distributed at the DNS level across a few computers.
But this is generally a bad idea (without DNS health checks and other newer fancy things)
Because the actual computer behind your ip will inevitably crash, or update, or die, or reboot.
And now your website is fully down (1 ip) or partially down (1/3 of all traffic for example if you published 3 ips)
Why use CNAMEs at all?
Usually the CNAME record will point to some sort of load balancer. Think of this as router, it takes traffic in and sends it down to individual computers. If a computer dies, it takes it off from the available pool of computers; so that your traffic will hopefully live (session cache layer, etc, etc)
So in the old days DNS looked like this
MX record --> mail
CNAME record --> A record load balancer ips --> fleet of computers with internal ips added and dropped by lb
How does modern internet get on with root web traffic?
Some smart people got tired of typing www all the time so they invented CNAME flattening (DNS flattening) The DNS service provider, will dynamically update, and serve a fleet of individual ips as A records to the root domain lookup.
So now DNS looked like this
MX record -> mail
A record that keeps updating -> load balancer ips -> fleet of computers internal ips added and dropped by lb
Isn’t that similar to old days? Why don’t I just update my A records myself in the old days? Wouldn’t that be the same?
That’s actually exactly the same. The only problem with doing it yourself in the old days is DNS is hard.
DNS is basically a globally distributed cache managed at different layers by different people.
You COULD update the A records constantly yourself. You can even set your own record TTL to be 0 or 60seconds. However, random guy halfway across the world using budget ISP will not see your DNS update propagate to them for a few hours, sometimes 24 hours in worst case scenarios.
Modern DNS service providers (cloudflare, aws route53, etc, etc) has their own DNS hosted nodes distributed across the world for you so they auto update the records constantly for you to ensure no stale DNS hits if possible.
Practical Validation:
Since DNS is public you can run some queries yourself to see how DNS is managed by large companies
I’ll use amazon.com as example root MX record: https://mxtoolbox.com/SuperTool.aspx?action=mx%3Aamazon.com&run=toolpage
--> this is what makes your mail workroot A record: https://mxtoolbox.com/SuperTool.aspx?action=a%3Aamazon.com&run=toolpage
--> this is CNAME flattening of the root --> note the 3 ips - these are the dynamic ips of the load balancer for the region mxtoolbox is running inroot CNAME record: https://mxtoolbox.com/SuperTool.aspx?action=cname%3Aamazon.com&run=toolpage
--> does not exist! because it can't. MX record already lives heresubdomain CNAME record: https://mxtoolbox.com/SuperTool.aspx?action=cname%3Awww.amazon.com&run=toolpage
--> this exists! to route traffic to the web server --> this is going to be some weird address <randomstring>-frontier.amazon.com this is some CDN that amazon uses to push traffic as close to the edge location where you are at to reduce page load times because physics existsBack when people still hosted their own email and web pages and domain controllers etc, it was more common to break it out into subdomains. The www subdomain was for the web stuff that the webmaster would administer. Nowadays everything is outsourced, and you just point your main domain ar whatever webhosting company you’re using.
But it was always possible to have a normal A record on your main domain and have a webserver listen to its port 80.
I guess at some point everybody got so used to the world wide web just being there and every business being on it, that using the cool alliteration didn’t feel necessary anymore.
What’s an A record?
Domain names are just human-readable addresses for a web server. An A record is just a pointer to the IP address of the web server a given domain name represents. It’s what domain name servers use to tell your browser where it actually needs to send your request.
The A record is the record in a DNS entry that contains the IPv4 address to which you wish to map the name in general.
There are various others, for example the AAAA record is the one that contains the IPv6 address, the MX record is the one that contains the name of your mail server, the NS record contains the name of your nameserver, the SOA record has refresh timers and contact information for the zone admin, RRSIG records have cryptographic signatures proving authenticity of various other bits.
Another interesting one in this context would be CNAME, there you can put the canonical name you’d like the user to look up instead of the one they were asking for. So you can leave out the A and AAAA, and put in a CNAME instead if you want to tell the user to look somewhere else.
For example you can put in the DNS entry for www.example.com a CNAME record containing “example.com”. Now if a user comes asking for the A record of www.example.com, they will find the CNAME instead and know that they are supposed to look at the A record of example.com instead, because there isn’t a separate IPv4 address specifically for www.example.com.
www was never necessary. It was used to distinguish other connection methods for the user(imagine ftp://, mail://, gopher://, etc) but you could always choose to route your domain(and any subdomain) to your web server. It remained part of marketing because it was what people expected. People kept using it in communication because they thought it was required.
ww1. or wwtubulartitty. could be routed to any web directory/page, sometimes maintainers will use ww1/ww2/etc to show that it’s routing to an alternate version of the site(like language, location, etc.).
If you visit a site that only works with www. and not without, it’s almost always because the person setting up the server screwed up.
No, it was to distinguish your web server hostname from your other service host. For example, “www.google.com” is (possibly) a different A/AAAA record than “smtp.google.com” And google.com is the domain those hosts are in, for their forward lookup.
For record, in-addr.arpa. has all the IPv4 and ip6.arpa. has all the IPv6 reverse lookup records.
It is superfluous information as a browser address. For a browser address there is a default intention of accessing web pages.
Yes, this is the correct answer
Though, until load balancers/reverse proxies came onto the scene, separating web traffic to a separate host may have been wise. But then again, that was also when it was more textual and dialup was common.
remained part of marketing because it was what people expected.
It sort of matches the cadence of;
“CALL, 1-800… BLA BLA BLA… BLA-BLA BLA-BLA.”
“Visit, www… DOT… BLA-BLA DOT-COM”
giving the audience a familiar auditory signal to pay closer attention to the next bit.
Exactly. “Go to my house dot Com” would probably trip some people up because they weren’t expecting to be given a website name by audio, instead initially thinking they should go to my house, then being unsure if they missed prior info. Now, it’s the default. For a similar cue reason, I still say things like “Vin number” if I’m trying to be clear as possible, particularly by phone. “can you give me the Vin” is sometimes misunderstood or misheard because “Vin” is a very mumbly word. “Vin number” gives an obvious retroactive explanation.
Humans use context in audio constantly and have to work backwards often to find the full meaning. It’s just natural and smoothpy accomplished. If you’ve ever said “what” and then answered the question when it was being asked the second time, you worked backwards and figured it out
dotslashdotdashdotslashdotdash dotcom
dot com
I’ve also never used it for my own domains. 4 characters less is a win.
www was never necessary
It was necessary to access many websites, unless the people running the site made an alias/redirect. Which yes, usually they did. But I definitely ran into cases where that didn’t happen and I worked on websites where it didn’t. Was rarely/almost never my decision on how that was set up. But yes from a tech perspective no one ever had to use that subdomain.Some websites were setup in a way that made it necessary to type. Apparently what I wrote above was somehow controversial.
It was not. Sysops would choose to have port 80 land on www. but every server daemon like Apache would honor the hostname set by the maintainer, regardless of what subdomain was being called. Never was there a routing method that just looked at the subdomain to determine what to do with the request. Maintainers could choose to require a particular subdomain and prebuilt server packages/management systems offered it as a convenience but it was never mandatory.
The domain routing at the registrar would be where you would translate the name into an IP and your server would determine what to do with the request based on the port and request type. At no time during this process was www. subdomain necessary to point it to your web server daemon.
You seem to be mixing the fact that many server providers wouldn’t offer you a chance to change it but that doesn’t mean it was necessary to route a web request. It was just a shitty offering by the provider.
deleted by creator
You made yourself very clear. The people that set up your servers didn’t offer you the option and you’re trying to tell the community that www. was necessary because of that.
/flex.
deleted by creator
If my mom made me say a prayer before I ate, that doesn’t mean you have to pray to make food go in your mouth. YOUR HOST CHOSE TO SET UP YOUR SERVER THAT WAY. IT WAS NEVER NECESSARY FOR YOUR WEBSITE TO WORK, IT WAS A DECISION YOUR HOST MADE. Let me know if this is still too verbose for you.
I was clear, I’m not the problem here.
There’s two things at play here.
First, www originated in a time when the web was not synonymous with the internet. Gopher, FTP etc were a much larger part of peoples daily internet usage, and servers would have different subdomain names to account for that. ftp.tld.edu, gopher.tld.edu and www.tld.edu were all domains you might see for a single server for example. Then of course, the web grew, and the other protocols became less relevant, but the www stuck around. One of the reasons you’re seeing less of it, is because that tradition is slowly fading away given its loss of daily relevance.
The other reason you’re seeing less of it is that browsers often just hide it even when it’s there. And that of course, will create more future instances of servers just dropping it completely.
Fuck winsock.dll. fuck that file.
I remember being little and my dad was shaving for work for his weekend job and dragging him to my PC to show him all the other protocol apps I had downloaded.
BBS guy. Never got him on mirc.
Nowdays ftp-things are like ftp:// and normal websites use https://, is this a newer thing?
No — that prefix tells the OS which application to direct the address to.
The www., ftp., mail., etc. are on the server side, so the client gets directed to the correct computer owned by the domain owner.
To some degree, this quickly became irrelevant when virtual hosting became a thing; you could have something watching on the server side that would see an attempt to connect to port 80 or port 443, check the domain the client is looking for, and redirect them to the right internal or external IP address.
With the onset of CDNs, it became even less meaningful since load and availability balancers will now decide what computer will eventually receive the request.
All you really need is the URI (https://) and the port (:443) and everything else can be a black box.
Why don’t we see :80 and :443 on URLs anymore? Because a web browser, when it handles the URI request, auto-maps to the default ports for that URI unless it is explicitly told to use another.
As a result, you can enter example.com into a browser address bar, and you’ll automatically be taken to [https://guest@www.example.com/ :443/] but all you’ll see on the browser bar is example.com.
[edit] hah; even Lemmy is munging my URLs to remove the bits it deems unnecessary.
[edit] hah; even Lemmy is munging my URLs to remove the bits it deems unnecessary.
Use backticks to tell us exactly without Lemmy attempting to correct you or parse anything
`https://www.example.com/`becomes
https://www.example.com/
Okay. ftp://, http://, https:// are associate with protocols that operate on a common port. You can execute “cat /etc/protocol” (on macOS or Linux terminal) and see each associate common port and their protocol name.
The protocol is associated with a port that is open on a host, which is associated with a process in the OS and that process listens and “talks” those ways when a host connects with a client, like a web browser.
Those are schemes and they are not new, there are many others as well. Some you may see in a browser are http, mailto, file. Others that you won’t typically see in browsers include ldap(s), imap, jdbc, odbc, etc. https://en.wikipedia.org/wiki/List_of_URI_schemes
Newer, yes. Not very new.
The URL format of protocol://hostname.domain:port/path was defined in 1994. Prior to that you would use use an ftp client, usually on the command line like:
ftp hostname.domain
I’ve always made the ‘www.’ work for any site I’ve administered, but they immediately redirect with a 301 to the same url without it. It’s never been necessary, and I’ve always found it an eyesore.
Start with reading the documentation that explains this config:
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://%1$1 [R=301,L]I do the opposite. 😄
You’re free to be wrong.
You as well. You are free to do it your way as are they without either being wrong.
It’s still there, you just don’t need it since it’s usually a given. Like how you didn’t need to actually type out “http://” back in the day.
I am upset only by “back in the day.”.
THOUSANDS OF YEARS AGO…
In the 1900s
aka, last decade.
That’s not true. It’s usually not there, and unlike “http(s)://”, the browser doesn’t assume it for you. www.example.com and example.com can be different websites, so a browser cannot assume the “www”.
In fact try going to your own instance: www.pawb.social
It doesn’t work with “www”.
If 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. 🤦♂️
Websites that don’t use the www subdomain and are valid without it won’t have it get automatically added, but if it’s not valid it will attempt to use the www subdomain and either give a 404 because it doesn’t exist or will send you to a different site than you expect.
There was a time when you couldn’t even have “reddit.com” work at all without actually typing the www. part. Just like when websites aren’t secure and the automatic HTTPS needs to have the S removed so the page can load.
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.
I never said the browser does it. I just said it was assumed and not necessary to be typed into the browser.
If you didn’t mean the browser, then I don’t see how this makes any sense:
if it’s not valid it will attempt to use the www subdomain and either give a 404
What’s “it” here which is attempting something? 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. So who’s “attempting” to unsuccessfully use the “www” subdomain?
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.
Edit: the opposite is also possible and happens some times, where “www.example.com” would just redirect to the main domain “example.com”. This is usually done for backwards compatibility since a lot of people would assume www is necessary and type it out even if it doesn’t exist.
This is wrong, it’s not there anymore, it used to be, but now lots of pages don’t even redirect it, they just simply don’t work.
The company owns the “example.com” domain name and can put what they want before it. The “www.” part (which stands for World Wide Web) was a convention for the company to put their website on, as other subdomains may be used for other services than websites. As time went on, companies started to make the “example.com” itself point to the website as it is shorter and easier to type/remember, and made the “www.example.com” redirect you to “example.com” for retrocompatibility
It’s been “hidden” since Chrome v95 or something. Also, many companies might just host their web service on their main domain name.
Also, hit Ctrl+Enter in any browser and it’ll tack that right on it and goto the webpage or hit a redirect or 5…whatever their architect setup.
google.com may be a CNAME to www.google.com (for example).
The www (or whatever hostname) is just to balance the web traffic from the other Internet services, like SMTP, POP3, IMAP, FTP, etc.
In addition to all the good answers, there also the case that most browsers just hide it nowadays. Go to google.com, you’ll see only that text in the URL field, the http(s)://www part is only shown when you click into the field, because as many have already said, it’s redundant in today’s infrastructure
I know its not necessary but I still type it because I’m old and have muscle memory
Here, hit Ctrl+Enter…after Google and it’ll pop it right in there.
www. plays in my head a fair bit. It’s that song that has the ICQ Uh Oh sound in it.
Never heard this one before, but I clicked it just to hear the uh oh.
because it used to be necessarily, and it ICANN reformed stuff years ago, so now it’s not. it’s also why you can have all sorts of weird new suffixes you coudln’t before.
you can look it up on the ICANN history website of web standards.
IT guy here, I can’t believe it was ever technically necessary, though I wouldn’t be surprised if it was a best practice published by ICANN.
browsers didn’t auto-complete it like they do now, so it was necessary for users to type it when manually entering a URL.
It was only necessary if the site was configured that way which most typically were. This was to differentiate which server would handle the request, web, file, mail, etc. I’m pretty sure there was no RFC that stated it was a requirement. Even on the early web it wasn’t uncommon to see a www2 or some other numbered prefix for different versions of a site. The reason you see it less now is because like you said browsers will add it, but also because most sites no longer use it as web is typically the assumed default.
I think before all browsers ended up filling it in, it was standard practice to set up the server to intercept anything missing that part before the domain name and stick a “www” in front so it wouldn’t just dead end. Basically a redirect.
That “www” is the name of the computer. It used to be that people liked to have a different computer just doing web stuff.
Nowadays you don’t need to put the computer name on the address to send the web connections to it. But also, almost everybody hacks their network so that any computer can answer to any name they want. So people normalized not naming an specific computer to answer.
Well it’s a subdomain. You could have www.example.com and ftp.example.com go to the same computer, or you could have a load balancer direct www to multiple computers. But it’s helpful for keeping stuff organized in your configuration to give them different names based on what kind of content and/or protocol they’re serving out.
Google does a pretty good job at this where it’s mail.google.com for gmail, www.google.com for their search, and if you’re logging into any google account, it’s something like accounts.google.com. That way you know which company you’re exchanging information with from the domain name, and the subdomain tells you which service you’re using. Helpful if you want to make sure it’s not a phishing site.
Load balancers were uncommon in the 90s fwiw
Sure but even with load balancers, it makes a lot of sense to use subdomains to route data.













