1

I've recently generated a sitemap.xml for my website to help with its visibility on search engines. With this in mind, I have a specific concern about the structure of the URLs listed within the sitemap. If I list URLs using the format https://example.com (without www), will this particular format have any implications on my website's traffic, its ability to be crawled efficiently by search engines, and its subsequent indexing? I'm keen to understand if the structure of the URLs in the sitemap can impact these aspects and if there are any best practices I should be following.

1 Answer 1

4

Whether or not you include the www in the URLs is not important. It won't affect how well or easily Google indexes your site. What does matter is consistency.

Pick one URL format and stick to it. All internal links, canonical URLs, and sitemaps should use that URL format.

Best practice is to redirect traffic from one format to the other, so all https://www.example.com URLs should redirect to https://example.com equivalents, for example (or vice versa, depending on which you prefer).

The reason for this is that if both variants of the URLs are indexed, Google will see them as distinct URLs with duplicate content. This isn't necessarily problematic (if you have proper canonical URLs defined), but it's not ideal. Stick to the one URL structure improves your chances of good SEO performance.

1
  • Just want to add, URLs in the sitemap should match how they exist. If you use www. the links in the sitemap should match and not need a redirect. If you use a crawler to make the sitemap it should match already. Same with WordPress plugins.
    – keepkalm
    Aug 23 at 14:13

Your Answer

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

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