Contact Us
  • WWW vs non-WWW for your Canonical Domain URL – Which is Best and Why?

    Someone asked me about this recently and, although I preferred using the WWW hostname (WWW is not a subdomain, a common misconception.) in website URLs, I wasn’t so clear as to the whys or wherefores about this or whether one was more desirable over the other.

    In doing my research, it became clear that it’s a mini-controversy with ardent proponents on both sides of the issue. In fact, there is, a website that argues for including the WWW in URLs and, a site that argues for “bare” or “naked” domains, i.e., NOT including the WWW in your site URLs.

    Either way, you should pick one and stick with it!

    WWW vs. non-WWW: The Arguments FOR and AGAINST

    As I mentioned above, there are fairly passionate views about both sides of this issue, and each has its merits.

    It should be made clear, however, that whatever your preference, the choice between WWW and non-WWW has NO impact on your website’s SEO. SEO DOES come into play if you don’t specify a Canonical URL which I discuss later in this article.

    The Argument for using WWW

    There are a couple of technical reasons why you might choose using the WWW over the non-WWW, as well as reasons related more to convention and personal preference.

    From a technical perspective, there are several benefits to including the WWW.

    • Ability to restrict cookies when using multiple subdomains. Cookies of a main domain (i.e. are sent to all subdomains: If you are going to have subdomains for other purposes (blog for instance), you may want to differentiate the sites and have a www prefix for the regular site.
    • WWW actually MEANS something. As mentioned above, WWW is a hostname, and the hostname names the specific service being used a computer network; WWW names the web service for a domain.
    • Using the WWW hostname allows for easy segregation in the file structure of your website. Everything in the “www” folder (and at the domain) is directly related to serving the site to the public. This allows for simple root-level site organization, eg you could also have a dev folder and have a subdomain for your development site, etc.
    • More flexibility with DNS. Your domain’s “Zone” file controls where traffic to your domain is directed and using the non-WWW version of your domain can complicate things. The site has the technical explanations here and here.

    If the above reasons for using WWW in your domain URLs don’t really apply to you, you may still want to use the WWW simply because it’s conventional to do so. On a business card, the WWW clearly conveys, This is our address on the World Wide Web.

    People are used to looking for, and seeing, the WWW and that’s sufficient reason for many to stick to the convention.

    NOTE: It’s interesting to observe that most sites set their Canonical URL to WWW. Just check out, say, — or almost any major site you can think of, typing in just the domain name WITHOUT the WWW and see how it redirects to the WWW version.

    The Argument for non-WWW Domains

    On, they summarize their argument for NOT using WWW:: “Succinctly, use of the www subdomain is redundant and time consuming to communicate. The internet, media, and society are all better off without it.”

    Of course, those are rather vague objections, but if you’re someone who thinks shorter is better, then perhaps the non-WWW approach will make you feel better. There are apparently no “technical” benefits to using the non-WWW approach, only that it reduces redundancy and is no longer needed (which isn’t really true, in many cases).

    Either way, the key is to be consistent with your choice. And the way you ensure consistency is through setting up your website to declare its Canonical URL, via the methods described below.

    The Canonical URL

    Once you’ve made your decision regarding WWW vs. non-WWW, then it’s time to make sure that your site pages that are indexed in search engines ALL reflect your preferred domain.

    What is a Canonical URL?

    According to Wikipedia: “URL Canonization (aka URL Normalization) is the process by which URLs are modified and standardized in a consistent manner. The goal of the normalization process is to transform a URL into a normalized or canonical URL so it is possible to determine if two syntactically different URLs may be equivalent.”

    Canonical URL and SEO

    Although your choice of using either WWW or non-WWW for your site’s domain doesn’t, in itself, impact SEO, NOT having a Canonical URL can definitely affect your SEO!

    Google specifically says “If you don’t specify a preferred domain, we may treat the www and non-www versions of the domain as separate references to separate pages.” And this can expose your website to duplicate-content issues, with both WWW and non-WWW versions of your pages being included in the search engine indexes.

    Google Webmaster Tools article on Canonicalization: “To gain more control over how your URLs appear in search results, and to consolidate properties, such as link popularity, we recommend that you pick a canonical (preferred) URL as the preferred version of the page. You can indicate your preference to Google in a number of ways. We recommend them all, though none of them is required (if you don’t indicate a canonical URL, we’ll identify what we think is the best version).” [Emphasis added.]

    As you should know, “link popularity” and “duplicate content” loom very large in how your website’s pages rank in searches, so establishing and re-enforcing your Canonical URL is very important!

    How to Convey your Canonical URL to Google and other search engines

    • Put a “rel=canonical” tag in the <head> of your HTML pages;
    • Setting your “Preferred Domain” in Google’s Webmaster Tools;
    • Using your preferred domain in your XML site map;
    • Adding a 301 Redirect in your .htaccess file (on Apache servers).

    For more excellent info, read Google’s Webmaster Tools article on Canonicalization.

    Setting the canonical URL via the “rel” tag:

    <link rel="canonical" href="" />

    Whereas a 301 redirect re-points all traffic (bots and human visitors), the Canonical URL tag is just for engines, meaning you can still separately track visitors to the unique URL versions.

    This approach can be cumbersome and is somewhat limited, and a better approach is using a 301 Redirect in your site’s .htaccess file. However, modifications to your .htaccess file should only be done by someone familiar with such work. If you don’t have someone who can do this, then the rel=canonical approach would be the way to go.

    Setting the WWW canonical URL via a 301 Redirect:

    You can do this by including either of the following “directives” in your .htaccess file. NOTE: Only servers running Apache (usually on the Linux OS) use the .htaccess file. If your hosting OS is Windows or something other than Apache, consult your provider or webmaster about setting up 301 Redirects.

    This is the best method for setting your Canonical URL, because it redirects all traffic to the preferred domain URL. This helps ensure that your Canonical URL is always reflected on your site (in the browser address bar, or when a page is bookmarked, etc.).

    Options +FollowSymlinks
    RewriteEngine On
    RewriteCond %{http_host} ^ [NC]
    RewriteRule ^(.*)$$1 [R=301,NC]

    or, to set a non-www canonical URL:

    Options +FollowSymlinks
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^www.(.+)$ [NC]
    RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

    Google Webmaster Tools recommends using 301 Redirects to indicate your Canonical URL.

    Additional Resources


    1. Donna McMaster says:

      Being a technologist and associated with the Internet since the 1980s, I always lean toward “www.”, but I was starting to wonder whether I was become archaic. Thanks for your clear summary of the options. You also pointed out some considerations I wasn’t aware of. Now I can point new clients to your article for the details.

      • Thanks Donna. Same with me. Always sort of assumed WWW was better, but I was drilled on it by someone and realized I needed to do the research and write it up! Cheers.

    2. When you already did an SEO for non-www stick to it because you will be needing to make one if you are going to change to www.

      • If someone decides to change their Canonical Domain from non-WWW to WWW, I’m not so sure that they’ll take much of a ranking hit, if any at all. As long as you 1) change the .htaccess 301 Redirect; 2) change your Preferred Domain in Google Webmaster Tools; and 3) change any absolute URLs on your website to match your new Canonical Domain, I would suspect you’d not take an SEO hit.

    3. Actually, www is the hostname, not a subdomain 😉

    4. jordan walker says:

      I agree with this posting!

    5. Well after reading your post i decided to drop the www from my domain name. As both versions refer to two different sites to search engine spiders it’s better to have one version and then redirect another version to it preferably the non www version. Henceforth i’m starting websites with no www in domain name. Thanks for this nice article.

    6. I would have to agree.

    Speak Your Mind