Your Domain Name: Do You www or Not?

By Craig Buckler
We teamed up with SiteGround
To bring you the latest from the web and tried-and-true hosting, recommended for designers and developers. SitePoint Readers Get Up To 65% OFF Now

This article is part of a series created in partnership with SiteGround. Thank you for supporting the partners who make SitePoint possible.

In the early days of the web it was imperative to publish your web address with a ‘www’ prefix. Those three characters prevented confusion; it was more obvious you meant a web domain.

But is the ‘www’ necessary in 2017?

The web is prolific and few organizations opt to publish their URL with a preceding ‘www’. People understand that,, and are websites. The dot-something top-level domain (TLD) such as ‘.com’ makes this more obvious but, even without it, the web is normally the first point of call for anyone looking for a company or service.

The Case For ‘www’

The ‘www’ prefix has not been deprecated. It’s unambiguous, technically accurate and distinguishes the address from similar URLs for protocols such as mail or FTP.

While a web address may be identifiable from it’s .com or country-specific prefix, hundreds of top-level domain options have been introduced in the past few years. If you’re using a less recognisable or ambiguous TLD, such as, adding a ‘www’ will help avoid any doubt.

Without the ‘www’, you must set your root (non-www) domain DNS A-record to point at your web server’s IP address. This can be too rigid if you encounter availability or performance issues; the A-record is fixed and can take a day or two for changes to propagate. A ‘www’ sub-domain can be configured using a DNS CNAME record which can be updated and changed instantly.

You also need to be cautious of cookie and client-side storage. A cookie, sessionStorage, or localStorage value set for a non-www domain is shared throughout all sub-domains. If your primary website — — sets 10Kb of cookie data, it’ll be transmitted with every request and response for whether that application uses the data or not.

Finally, the ‘www’ prefix is essential in applications such as email clients and word processors which transform text to links.

The Case For No ‘www’

Despite the technical issues raised above, using a non-www domain is rarely a problem unless you have complex hosting or application requirements. Root addresses are easier to read, quicker to type and fit easier in smaller (mobile) browser interfaces. The address is more likely to work your next tweet without having to use a URL shortener.

Few people will be confused — especially when many use the Google search box rather than the browser address bar.

It’s Mostly a Vanity Thing

Some domain names look better and more balanced with the ‘www’, e.g.


Some look better without:


Some appear to work well in either orientation:

  • /
  • /
  • /

Choose whichever suits your domain but…

Configure It Wisely

Users may or may not add a ‘www’ so ensure both the www and non-www address works when a browser request is made. This can be achieved in serveral ways but the easiest option can be a web server configuration setting.

The following code in configures Apache to redirect all non-www requests to the www version of the URL. Add it to a .htaccess file in your web root:

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

Alternatively, this .htaccess redirects all www requests to the non-www URL:

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

This allows you to publicise the ‘www’ domain in documents or emails even if it’s not required.

You should also be wary if your site is served over secure HTTPS. SSL certificates are often valid for both the non-www and www domain but there’s no guarantee. Check with your Certificate Authority — it may be necessary to purchase an additional or wildcard certificate if you have the wrong one. Some hosting providers, like our partner SiteGround, let you order an SSL certificate that will work with your domain with or without the www prefix.

Finally, make a decision and stick with it. Never switch between non-www and www URLs on a whim! The .htaccess code above issues a `301 Moved Permanently` HTTP redirect code so browsers and search engines update their indexes accordingly. It can take time for changes to disseminate; users could encounter access problems while that occurs.

Did your company opt to use or drop the ‘www’? Was it a success? Did anyone notice?!

We teamed up with SiteGround
To bring you the latest from the web and tried-and-true hosting, recommended for designers and developers. SitePoint Readers Get Up To 65% OFF Now
  • I usually prefer no “www.” with .com, net, org, ccTLD, etc. However, with many TLDs in many cases it seems certain people are not even going to have a clue what it is or that it’s even referring them anywhere online if you don’t add “www.”

  • I am going by the following rule. If there are no subdomains, redirect all traffic to non-www. If you have subdomains, use www and redirect non-www traffic.

    • Craig Buckler

      Sounds sensible. Do you consider the text, though? Some URLs can look better with a www.

      • Beauty is in the eye of the beholder :) Although I do reserve the right to twist the rule from case to case. Although easy of memorisation matters most to me than “looking better”.

      • Sp4cecat

        ‘Look better’ though, is REALLY a subjective thing, wouldn’t you say?

        • Craig Buckler

          It’s absolutely subjective. But it’s your domain and it’s your decision.

      • One more thing against non-www: mobile users. Makes the url a little easier to type on a phone screen.

        • Craig Buckler

          It won’t matter if you’re redirecting.

        • Just search for the website name in Google and recognise the one you really want. Who types URLs these days? Even on Desktop… That doesn’t mean I’m pro www, I ditched it 15 years ago.

  • M⃠ ⃠S⃠ ⃠i⃠ ⃠N⃠ ⃠L⃠u⃠n⃠d⃠

    Since there are all kinds of crazy top-domains now, I think the www-part is a nice clarifier to have.

    Pretty soon any old word will be a domain.

    You see truck with “www.erics.waffles” on it, an you just know.

    Just erics.waffles
    not so much.

    • Craig Buckler

      Agreed. I keep seeing sites which fail to implement a simple redirect – and they rarely have a meaningful 404 either. It’s never obvious whether the www is or isn’t required – they must lose visitors.

    • Not to mention that having both versions live can lead to Google considering it duplicated content and applying penalties.

      • Not if you properky register your site in all its address forms on google webmaster tools and then pick the one you want it to consider your actual site address

        • I didn’t know that and I am willing to bet many people don’t know either.

      • Craig Buckler

        Redirecting solves that issue.

  • Hi Buckler,

    Thank you for a useful information. I am planning to buy a domain for my new business still I am preparing for the steps need to follow. this post clarified my many doubts.