← Back to glossary

XML sitemap

SEO

A machine-readable file listing URLs you want search engines to index, formatted in XML.

How XML sitemaps work

XML sitemaps list every important page on your site with optional metadata: last modification dates, change frequency hints, and priority indicators. Search engines use this as a map for efficient crawling.

While search engines discover pages through internal links, sitemaps ensure nothing important gets missed. New pages appear in sitemaps before they're well-linked internally, accelerating discovery and indexing.

Sitemap structure and limits

Sitemaps can include up to 50,000 URLs and must stay under 50MB uncompressed. Larger sites need sitemap index files referencing multiple smaller sitemaps—one for blog posts, one for products, one for service pages.

Each URL entry can include lastmod (last modification date), changefreq (how often content updates), and priority (relative importance 0.0-1.0). While Google mostly ignores priority and changefreq, lastmod helps determine recrawl frequency.

Submitting and maintaining sitemaps

Submit sitemaps through Google Search Console for faster discovery. Reference your sitemap in robots.txt—search engines check this file and follow sitemap directives automatically.

After significant site updates, resubmit your sitemap or use Search Console's URL inspection tool to request indexing of specific pages. This prompts crawlers to check for changes sooner than waiting for automatic discovery.

Automatic sitemap generation

We generate XML sitemaps automatically during every build. Astro sites rebuild sitemaps with each deployment, ensuring they always reflect current content accurately.

This automation means sitemaps never require manual maintenance. Add a page, it appears in the sitemap. Remove a page, it disappears. Sitemaps stay current without ongoing work, helping search engines discover content efficiently.

Why it matters

Understanding “XML sitemap” helps you speak the same language as our design and development team. If you need help applying it to your project, book a Fernside call.