14

For search engines and website crawlers, does the url order matter in a XML sitemap?

Currently when the sitemap is generated, I order the website urls sequentially using a unique id, in the database. Should I order the urls in date order?

Sequential Sitemap

<urlset>
 <url>
  <loc>http://example.com/</loc>
  <lastmod>2009-08-14</lastmod>
 </url>
 <url>
  <loc>http://example.com/article/1/about_us</loc>
  <lastmod>2009-07-14</lastmod>
 </url>
 <url>
  <loc>http://example.com/article/2/contacts</loc>
  <lastmod>2009-08-09</lastmod>
  </url>
</urlset>

Date Ordered Sitemap

<urlset>
 <url>
  <loc>http://example.com/</loc>
  <lastmod>2009-08-14</lastmod>
 </url>
 <url>
  <loc>http://example.com/article/2/contacts</loc>
  <lastmod>2009-08-09</lastmod>
  </url>
 <url>
  <loc>http://example.com/article/1/about_us</loc>
  <lastmod>2009-07-14</lastmod>
 </url>
</urlset>
stukelly
  • 4,257
  • 3
  • 37
  • 44

1 Answers1

17

After some more searching I found an answer on the FAQ at sitemaps.org.

Q: Does position of a URL in a Sitemap influence its use?

No. The position of a URL in the Sitemap is not likely to impact how it is used or regarded by search engines.

stukelly
  • 4,257
  • 3
  • 37
  • 44
  • 1
    I think it's more complex. I would believe that the first entries have more importance than the last one from an SEO point of view. – Hartator Aug 02 '13 at 21:56
  • 2
    This answer is correct. It's not "more complex". The idea of "first being more important" is a human construct. These are machines. Sitemaps have the concept of "priority" if you want to try to make things more important, but Google largely ignores that property and learns how to crawl on it's own. – B-Stewart Oct 30 '18 at 22:28
  • 3
    Pertaining to how Google handles sitemaps, from [Google's John Mueller (2018)](https://www.seroundtable.com/google-sitemaps-url-order-does-not-matter-25896.html) _Google's John Mueller said on Twitter that the order of the URLs in your XML Sitemap files does not matter._ – Elliott Jul 12 '19 at 20:35
  • You are probably right that the order is not important but Google is not the only search engine out there and sitemaps may be used for other purposes as well. When a machine processes the sitemap it might process it sequentially. If you work at google and have insight into the algorithms, you might be able to answer it for Google, the rest is mostly guesswork. – Sybille Peters Nov 22 '22 at 15:06