SEO
Sitemap.xml
A file that tells search engines what pages exist on your site - required for Google Search Console and full indexing.
medium severityWhat is this?
A sitemap.xml is an XML file at /sitemap.xml listing all the pages on your site that should be indexed, along with optional metadata like last-modified date and update frequency:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://yourdomain.com/</loc>
<lastmod>2024-01-01</lastmod>
</url>
</urlset>
You don't write this by hand - your framework generates it automatically.
Why it matters
- Google Search Console requires a sitemap to show you which pages are indexed and flag indexing errors
- Pages may be missed without it - especially deeper pages or recently added content
- Faster indexing of new content. Submitting an updated sitemap signals Google to crawl your changes
How to fix it
- Generate the sitemap using your framework's plugin
- Verify it's accessible at
https://yourdomain.com/sitemap.xml - Submit it in Google Search Console: Sitemaps → add
/sitemap.xml
Providers & tools
| Framework | Plugin/tool |
|---|---|
| Next.js (13.3+) | Built-in: create app/sitemap.js returning a sitemap config |
| Next.js (older) | next-sitemap npm package |
| Astro | @astrojs/sitemap integration |
| SvelteKit | svelte-sitemap or manual generation |
| Django | Built-in: django.contrib.sitemaps |
| Rails | sitemap_generator gem |
| Static site | Create manually or use xml-sitemap CLI |
Check if your domain has this issue