Should I have both example.com and www.example.com?
UX Importance
User Experience also known as UX remains one of the most important factors when managing and operating a website. User experience enhances your conversions, increases time spent on page and indirectly improves rankings due to an increase of people wanting to link to your website.
Having a site not accessible via both with or without www
causes a few user experience problems, the biggest problem would be what if people manually type your domain with or without www
directly into the address bar, a browser returning Server not found
could loss you a site visitor and the less visitors you have the less chance of social mention and back linking opportunities.
Having a site that is not accessible by both means would definitely dampen user experience as well as missing out on SEO opportunities.
SEO Importance
Google and many other major search engines reward websites that gain quality back links, should it be a blog link, a forum link or even a social mention all these typical examples are quality ways of easily increasing your website naturally. A website that receives a link to http://www.example.com
but is only accessible typing http://example.com
is not gaining any SEO value from that link. This is because Google only passes link credit to pages and websites that are accessible after-all who wants to click something to get ‘server not found’.
Solution Part 1 (Domain DNS)
You should proceed by setting up your domain DNS to work with both www.example.com
and example.com
, this can be found by either changing your name servers to that of the web server or pointing AA/AAAA record to the domain and the sub domain with www using a cname alias. This setup procedure differs from registrar to registrar.
Solution Part 2 (301 Redirecting)
You should redirect all site visitors and bots to the preferred version of your website of course this step isn’t required but it helps track visitors and backlinks gained are mostly likely to the preferred version, links received that are 301 redirected loss a minor amount of credit. Also redirecting some what does slow down the page loading because of the initial bounce.
If using Apache2 as your web server then I recommend checking out what are the most commonly used and basic Apache htaccess redirects or in the event you are using Windows Server IIS then you should check out Microsoft's URL rewrite extension.
Solution Part 3 (Optional Canonical Links)
It is recommended these days use canonical links to help search engines establish the page, if the site is accessible with and without www
without a 301 redirect this step is pretty much a must as Google and other bots can mistakenly index your non preferred version. Also canonical links help prevent duplicate content unrelated to www
so even without the topic of www or not www it’s a helpful thing to have because you may have content accessible on different sub paths never mind the sub domains.
You really do need to have the www.
sub-domain point to your website. It is particularly important for type in traffic. If you tell a person to visit example.com
, a large number of them will add a www.
In my experience it is 40% or more that do this.
I myself tend to like naked domains with no subdomain when creating a website. I have occasionally neglected the redirecting www
in the past. I almost always get a complaint from somebody that "your website doesn't work" and it is because they are adding the www.
This is even the case when there is already some other subdomain like mytrip.example.com
. Some people insist and accessing it like www.mytrip.example.com
.
If Google is telling you that it can't access your site with www.
it is likely because there are external links that point to it. If you want to keep those links working and retain any PageRank from them, you should support the www.
subdomain.
Should you make www.example.com
redirect to your site? Absolutely. Speaking from someone who works as a web developer and has an IT degree, if typing www.example.com
didn't get me to your site, my first thought would not be to omit www
. I'd think, "Oh, the site must be down." Or I'd think, "I must not have gotten the domain name correct. Maybe it's exaample.com
. I'll google it."
If I was sure of the domain name, then my troubleshooting would stop at "Site's down." Maybe I'd try again the next day. If it still didn't work, I'd likely abandon my attempt completely.
My question is: why stop at redirecting www
? Make your website as human-proof as possible. Your web server should allow for redirection of *.example.com
. Do that. Then if a user types in ww.example.com
or blog.example.com
instead of example.com/blog
, they'll still get to your site. You can do this without breaking existing subdomains. webmail.example.com
can still work as intended.
Also, through the magic of IP filtering, you can make admin.example.com
work on your internal network. On your external network, admin.example.com
could redirect to example.com
.
My general thought: if you know people might or probably will have a problem, why not solve it? And while you're at it, since it doesn't take more work, why not solve all related problems?