TECHNICAL SEO 4 min read

XML Sitemap

An XML file that gives search engines an overview of all important pages on your website.

Bas Vermeer
Bas Vermeer SEO/AEO Specialist

An XML sitemap is a structured file that provides an overview of all URLs on your website that you want indexed. It helps search engines discover pages, especially if your site is large, has a complex structure, or contains few internal links — bibliotheekterm.

What's in a sitemap?

Each URL in the sitemap can be accompanied by metadata: the last modification date (lastmod), the change frequency (changefreq), and priority relative to other pages. Google ignores changefreq and priority but does use lastmod as a hint.

Sitemap best practices

Maximum 50,000 URLs per sitemap or 50 MB uncompressed. Use a sitemap index — bibliotheekterm if you have more URLs. Reference the sitemap in your robots.txt — bibliotheekterm. Keep the sitemap current: remove pages that return a 404 or noindex.

Sitemap.xml code example

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

  <!-- Homepage: always include, high priority -->
  <url>
    <loc>https://example.com/</loc>
    <lastmod>2026-04-20</lastmod>
    <changefreq>weekly</changefreq>
    <priority>1.0</priority>
  </url>

  <!-- Services page -->
  <url>
    <loc>https://example.com/services/seo-consulting/</loc>
    <lastmod>2026-03-15</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.8</priority>
  </url>

  <!-- Blog post -->
  <url>
    <loc>https://example.com/blog/what-is-aeo/</loc>
    <lastmod>2026-04-18</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.6</priority>
  </url>

</urlset>

Sitemap index code example

If you have more than 50,000 URLs or want to logically separate your sitemaps, use a sitemap index:

<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

  <sitemap>
    <loc>https://example.com/sitemap-pages.xml</loc>
    <lastmod>2026-04-20</lastmod>
  </sitemap>

  <sitemap>
    <loc>https://example.com/sitemap-blog.xml</loc>
    <lastmod>2026-04-18</lastmod>
  </sitemap>

  <sitemap>
    <loc>https://example.com/sitemap-products.xml</loc>
    <lastmod>2026-04-15</lastmod>
  </sitemap>

</sitemapindex>

Best practices

GuidelineRecommendationExplanation
Maximum size50,000 URLs or 50 MBUse a sitemap index if you have more
Only indexable URLsNo noindex, no 4xx/5xxEvery URL in the sitemap should return a 200 status
Track lastmod correctlyOnly update on actual changesGoogle uses lastmod as a crawl hint; fake values undermine trust
Use canonical URLsOnly include the canonical versionNo duplicates or parameterized URLs
Reference in robots.txtSitemap: https://example.com/sitemap.xmlBots automatically discover your sitemap this way
Submit in Search ConsoleManually submit after creationSpeeds up discovery and provides status reporting
Refresh regularlyAuto-generate on publicationStatic sitemaps quickly become outdated
Compressiongzip is allowed (.xml.gz)Reduces bandwidth, especially for large sitemaps

Frequently asked questions

Is a sitemap required?

No, a sitemap is not required. Search engines can also discover pages through internal links. But a sitemap speeds up the discovery process and gives you insight into how many pages are indexed via Search Console.

What if my CMS doesn't generate a sitemap?

Most modern CMSs (WordPress, Shopify, Laravel) have built-in or plugin-driven sitemap generators. If your CMS doesn't support this, you can use tools like Screaming Frog or XML-Sitemaps.com to generate one.

Should I include images and videos in my sitemap?

If you want Google to discover your images and videos faster, you can create separate image and video sitemaps. This is especially useful for sites that rely heavily on visual content.

How often should I update my sitemap?

Ideally, your sitemap is automatically updated with every publication or change. If that's not possible, update the sitemap at least weekly. Outdated sitemaps with incorrect lastmod dates lose their value.

What does our scanner check?

Our scanner checks whether your website has an accessible XML sitemap, whether it's correctly structured according to the sitemaps.org protocol, and whether the sitemap is referenced in your robots.txt. We also verify that the sitemap actually contains URLs and doesn't return an error status code. Test your sitemap configuration.

RELATED TERMS

Crawling

The automated scanning of websites by search engines and AI bots to discover content.

Reinier Sierag Reinier Sierag

Indexing

The storing and cataloging of web content by search engines so it becomes findable.

Bas Vermeer Bas Vermeer

RELATED SCANNER CHECKS

Sitemap present

RELATED ARTICLES

Bas Vermeer
Bas Vermeer

SEO/AEO Specialist

My career started by manually combing through server log files. I wanted to understand how Googlebot crawls websites. That fascination with the technical side of discoverability? Never faded. At Koba...