To me, www. is dead (read that article here), and has been for sometime. It has no comprehensible use or purpose any longer that I am aware of except for taking up space and time and frankly, looks a little dated.
I’m on a mission to strip it from all of my personal websites and any future projects. UPDATE — I’m happy to say that I’ve been clean and soberly free of www. for several months now on all my sites.
For some of my more avid readers, you may have already noticed that: https://bryanhadaway.com/ now redirects to: https://bryanhadaway.com/.
The only worry for some to make the plunge might be SEO. However, Google is smart enough now that it’s pretty good at realizing that when the www. and non-www. version of a page contain the exact same content, that they’re not really two separate pages. Of course, you’ll want implement a 301 redirect and using canonical links couldn’t hurt either. All of my PageRank is intact with the changeover so far.
If you’d like to take the plunge too, here is the code you’ll need to drop in the root folder of your website in an .htaccess file. To create an .htaccess file, simply pop open Notepad (Win) or TextEdit (Mac), paste in the code from below, and save as “All Files” with the filename .htaccess:
rewriteengine on
rewritecond %{http_host} ^www\.(.*)$ [nc]
rewriterule ^(.*)$ http://%1/$1 [r=301,l]
Best Practice for Changing to Non-www
- Enforce via .htaccess (code above)
- Change the URL structures to non-www on your site’s navigation and internal links
- Canonicalize the non-www versions of URLs
- Update sitemaps to reflect non-www URLs
- Set preferred domains to non-www in Google Webmaster Tools (which you should be using anyway)
- Check that Google has indexed the non-www versions after a while