Should You Use the WWW Subdomain? Why is it Even a Thing? Plus Some Advice
Since the web first became the web, web sites have used a www in front of their domain name.
Does your website need to use the www subdomain prefix?
What is the history behind using a www domain prefix?
Before the Internet became the World Wide Web there were many protocols used to server variety of things like telnet, email, gopher, FTP, etc. Oh the times we had way back in the early 90s and late 80s!
I miss archie and gopher.
Even though each service uses different port numbers and you also use a protocol prefix in the URL, server domains were often identified by the service abbreviation, like gopher.
This made it easier for system admins to configure individual servers to handle the different service request.
For example, smtp.example.com would be example.com's outbound email SMTP server, ftp.example.com would be example.com's FTP server, etc.
When the web came along it was called the world wide web and abbreviated as 'www'. So system admins naturally created servers to respond for this new service type.
At the time it was not common to serve the content from the organization's domain. But that quickly changed as the web caught fire.
Serving the web became more popular than just about every other service, at least in the public's eye. So we also started looking for web sites by just entering the organization's domain, without the www prefix.
The web became the default service for a domain.
But system administrators had already started using the www subdomain and needed to do something.
So we started configuring the default service to respond when the HTTP protocol and port 80 was used is the web site. We also configured the www subdomain to be a CNAME alias to the primary domain.
Now both www.example.com and example.com return the same content.
But we now have an issue, two different addresses. We need to fix that.
To do so companies redirect one using a 301 status code to the other. It became vogue to market the www subdomain to indicate you were on the web.
I think that has changed today as more brands just market their primary domain. Browser also have a built in Ctrl+Enter shortcut that will wrap a www and .com around just the brand's core domain name.
So if you enter 'love2dev' in your browser's address bar and press Ctrl+Enter it will automatically go to www.love2dev.com.
But you will be redirected to love2dev.com because I use my primary domain as the main destination.
No specific reason, just a personal preference.
As long as you use only a single domain and make it the final destination you are in good shape.
If you are not using a 301 redirect to either www.yourdomain.com or yourdomain.com (.com is just an example top level domain extension) then you should. If you don't you risk having duplicate content, which reduces your ability to rank well in search results.
And if you are wondering, Google and Bing do not care if you use your primary domain or the www subdomain. Just pick one.
Another common reason why sub-domains are used is to silo cookies. In this case it is not an issue since you should be using a single domain destination.
Finally, larger web sites can find value in segmenting content and application functionality by sub domains. The www subdomain can be used to indicate it is web, while 'hr', 'finance' or 'app' can be completely segmented.
It is up to you if you use the www subdomain address or just your domain to promote your website. It is a branding choice. Just make sure you are consistent when you promote your address across all marketing channels.