I was under the impression that www was deprecated but a lot of the sitemap generators seem to rather I use it. I know that Google doesn't like if I mix the two, IE if the URL of the sitemap is http://domain.com/sitemap.xml and the internal links show www. etc. Can anyone enlighten me?

Edit: Thanks for all the answers but I think I haven't been specific enough in the question, sorry; what I was trying to find out was why it seemed that the sitemap generators wanted me to put the www version in... I discovered from reading Dan Diplo's answer below that I was making a mistake in thinking that I could simply choose at the sitemap generator stage which was the canonical version - in my case anyway this had already been chosen (by me) at my server level and typing the other version into the generators was causing strange results.

Thanks for the other informative answers too.

4 Answers 4


For reasons why you should (or should not) use the www subdomain prefix then see this related post on StackOverflow which raises some good points for both cases. However, it is untrue to say it has been "deprecated" in any form - perhaps somewhat fallen out of favour, but in no way officially deprecated.

When it comes to SEO the main thing is to only use one form and stick with it. This should be the form you use in your sitemap (as well as publicity and promotional links). It should also be the form you select in Google Webmaster tools as your preferred domain.

Also, if you can access your site by both www and no-www then chose the one you want to use and perform a 301 redirect to the other, as recommended by Google:

If, for example, your home page can be reached in multiple ways - for instance, http://example.com/home, http://home.example.com, or http://www.example.com - it's a good idea to pick one of those URLs as your preferred (canonical) destination, and use 301 redirects to send traffic from the other URLs to your preferred URL.

  • thanks - please see edit above, I wasnt asking the question properly really .... but your comment about canonical destination ( redirect www to non-www or visa versa ) put me on to the answer - thanks Oct 3, 2011 at 20:14

You should use the same format you adopt on your website. If your preference is to use www, then also include the www in the URLs in your sitemap. Otherwise, if your website promotes the no-www version, then use no-www URLs.

If you haven't done it yet, you should make sure the URLs on your website are reachable just at one domain, regardless the user enters the www or not. You can easily do it using a www to no-www redirect script.

Regardless your choice, choose one version and stick with it on your sitemap and on your site.

  • Also, as pointed out in this question, if there's something, eg. a CMS managing your site, you might try looking for something that works within it rather than some external sitemap generator, as it'll be more likely to automatically respect your URL preferences by default.
    – Su'
    Oct 3, 2011 at 18:19

"www is deprecated" is a slogan, specifically for these people, who obviously have a stake in the concept. While it's true that there's no special reason to use the www sub-domain anymore, it's entirely something else–and untrue–to claim that it's deprecated. That term has specific connotations and results that don't apply here. For the rest of your question as far as implementation, see Simone's response.


A good sitemap generator will try detect what your website uses and create its sitemap accordingly (and convert non-matching-www links/URLs although it can discussed if showing an error possibly would be better.)

But it is never a good idea to mix www and no-www in your own website. You should settle on one, clean your internal links, setup redirect from one to the other, set it in Google Webmaster Tools, have XML sitemap URLs match the rest etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.