XML Sitemap
An XML file that gives search engines an overview of all important pages on your website.
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
| Guideline | Recommendation | Explanation |
|---|---|---|
| Maximum size | 50,000 URLs or 50 MB | Use a sitemap index if you have more |
| Only indexable URLs | No noindex, no 4xx/5xx | Every URL in the sitemap should return a 200 status |
| Track lastmod correctly | Only update on actual changes | Google uses lastmod as a crawl hint; fake values undermine trust |
| Use canonical URLs | Only include the canonical version | No duplicates or parameterized URLs |
| Reference in robots.txt | Sitemap: https://example.com/sitemap.xml | Bots automatically discover your sitemap this way |
| Submit in Search Console | Manually submit after creation | Speeds up discovery and provides status reporting |
| Refresh regularly | Auto-generate on publication | Static sitemaps quickly become outdated |
| Compression | gzip 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.