hyperrank
Technical SEO

The XML Sitemap: What It Is For and How to Set It Up

The XML sitemap is the list of URLs you want crawled. It helps discovery, without guaranteeing indexing.

· 1 min read

An XML sitemap is a file that lists your site's important URLs to help search engines discover and crawl them. It doesn't replace good internal linking, but it complements it, especially on large, new or poorly linked sites.

What does it look like?

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://www.example.com/page/</loc>
    <lastmod>2026-09-01</lastmod>
  </url>
</urlset>
  • loc: the page's full address (required).
  • lastmod: the page's real last modification date. Google uses it when it is reliable.

Google states that it ignores the priority and changefreq tags: no need to fill them in.

Technical limits

A sitemap file must not exceed 50,000 URLs or 50 MB uncompressed. Beyond that, split it into several files grouped in a sitemap index.

What to include

  • Only canonical URLs that you want indexed.
  • Only pages that return 200.
  • Pages you really want to rank.

What to leave out

  • noindex, redirected or error (404) pages.
  • URLs with sorting, tracking or session parameters.
  • Pages blocked by the robots.txt file.
  • Duplicated or very low-value content.

A "clean" sitemap sends a quality signal and eases diagnosis: the gap between submitted and indexed pages becomes easy to analyze.

How to submit it

  • Generate it with your CMS (WordPress, Shopify and most platforms do it automatically) or a generator.
  • Declare its address in the robots.txt file with the line Sitemap: https://www.example.com/sitemap.xml.
  • Submit it in Google Search Console, "Sitemaps" menu, to follow its processing.

Other types of sitemaps

  • Image and video sitemaps to help their discovery.
  • News sitemap for eligible news sites.
  • hreflang annotations can also be declared in a sitemap.

Common mistakes

  • A sitemap full of redirected or error URLs.
  • lastmod dates that are always artificially updated.
  • A sitemap forgotten after a redesign, containing old URLs.
  • Believing that being in the sitemap guarantees indexing: it's only a suggestion.
#xml sitemap#site map#crawling#search console#lastmod
Check your site for free SEO audit, speed, security, E-E-A-T… results in seconds.
Run an SEO audit →