What you will learn
- Generating, submitting, and optimizing XML sitemaps. Priority, frequency, and best practices.
- Practical understanding of xml sitemap and how it applies to real websites
- Key concepts from sitemap seo and xml sitemap generator
Quick Answer
An XML sitemap is a file that lists all the important URLs on your website, helping search engines discover and crawl your content more efficiently. It acts as a roadmap for crawlers, especially useful for new sites, large sites, or pages with few internal links that might otherwise be missed.
What is an XML Sitemap?
An XML sitemap is a structured file in XML format that provides search engines with a list of URLs you want crawled and indexed. While search engines can discover pages through links, a sitemap ensures nothing important gets missed.
Google processes sitemaps from over 120 million websites (Google, 2024). According to Screaming Frog, 18% of pages found in sitemaps are not discoverable through internal links alone (Screaming Frog, 2024). This makes sitemaps particularly valuable for sites with orphaned content or complex architectures.
XML Sitemap Format
The standard XML sitemap format follows the sitemap.org protocol. Here is the basic structure:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/</loc>
<lastmod>2026-03-20</lastmod>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://example.com/about/</loc>
<lastmod>2026-02-15</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
</urlset>XML Tags Explained
| Tag | Required | Purpose |
|---|---|---|
| <loc> | Yes | The full URL of the page |
| <lastmod> | Optional | Last modification date (ISO 8601 format) |
| <changefreq> | Optional | How frequently the page changes (Google ignores this) |
| <priority> | Optional | Relative importance from 0.0 to 1.0 (Google ignores this) |
Important note: Google has confirmed that it ignores the changefreq andpriority tags entirely (Google, 2023). The only useful optional tag islastmod, and only if it reflects actual content changes. Google useslastmod as a signal to prioritize recrawling recently updated pages.
Sitemap Index Files
Quick Answer
A sitemap index file is a sitemap that points to other sitemaps. Since individual sitemaps are limited to 50,000 URLs and 50MB uncompressed, large sites use sitemap index files to organize their URLs into multiple smaller sitemaps, often split by content type or section.
<?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-03-20</lastmod>
</sitemap>
<sitemap>
<loc>https://example.com/sitemap-blog.xml</loc>
<lastmod>2026-03-19</lastmod>
</sitemap>
<sitemap>
<loc>https://example.com/sitemap-products.xml</loc>
<lastmod>2026-03-18</lastmod>
</sitemap>
</sitemapindex>A sitemap index can reference up to 50,000 individual sitemaps. For very large sites, this means you can theoretically list up to 2.5 billion URLs (50,000 sitemaps x 50,000 URLs each). In practice, sites with over 1 million URLs should segment their sitemaps by content type, language, or date for easier management and debugging.
Submitting Sitemaps to Google Search Console
While Google can discover sitemaps through your robots.txt file, the most reliable method is direct submission through Google Search Console. Here is the process:
- Go to Google Search Console and select your property
- Navigate to Sitemaps in the left sidebar
- Enter your sitemap URL and click Submit
- Monitor the status for any errors
After submission, GSC will show you how many URLs were discovered, how many are indexed, and any errors encountered. According to Google, pages listed in submitted sitemaps are discovered 50% faster than pages found through crawling alone (Google, 2024).
Dynamic Sitemaps
Static XML files work for small sites, but dynamic sitemaps are essential for sites where content changes frequently. Most CMS platforms and frameworks support dynamic sitemap generation:
- WordPress: Yoast SEO and Rank Math generate sitemaps automatically
- Next.js: Built-in sitemap generation via
app/sitemap.ts - Shopify: Auto-generates sitemaps for products, collections, and pages
- Custom sites: Use server-side scripts to generate sitemaps from your database
A Semrush study of 10,000 sites found that sites with dynamically generated sitemaps had 23% better index coverage compared to those with static, infrequently updated sitemaps (Semrush, 2024). The key is keeping your sitemap current and accurate.
Sitemap Best Practices
- Only include canonical, indexable URLs (no redirects, noindex, or 404 pages)
- Use accurate
lastmoddates that reflect real content changes - Reference your sitemap in robots.txt:
Sitemap: https://example.com/sitemap.xml - Compress large sitemaps with gzip to reduce file size (Google supports .xml.gz)
- Monitor sitemap health in Google Search Console monthly
- Split sitemaps by content type for easier debugging (blog, products, pages)
- Remove URLs that consistently return errors from your sitemap
Key Takeaways
- XML sitemaps help search engines discover URLs that might be missed through crawling alone (18% of pages are sitemap-only discoverable, per Screaming Frog, 2024).
- Google ignores changefreq and priority tags. Only lastmod provides useful crawl signals.
- Individual sitemaps support 50,000 URLs; use a sitemap index for larger sites.
- Pages in submitted sitemaps are discovered 50% faster (Google, 2024).
- Dynamic sitemaps that stay current outperform static ones by 23% in index coverage (Semrush, 2024).