Key Takeaways
- XML sitemaps accelerate page discovery — critical for new and large sites
- Only include canonicalized, 200-status, non-noindex URLs
- Submit to Google Search Console AND Bing Webmaster Tools
- Always reference your sitemap in robots.txt for auto-discovery
- Use SM Developers' free Sitemap Generator to build one instantly
What Is a Sitemap and Why Does Every Website Need One?
An XML sitemap is a structured file that lists every important URL on your website and tells search engines exactly which pages exist, when they were last updated, and how frequently they change. Think of it as a roadmap you hand directly to Googlebot.
Without a sitemap, search engines discover your pages by following links. On a small, well-linked site, that works fine. On a large site, a site with orphan pages, or a brand-new domain with no backlinks, Googlebot can miss pages entirely — sometimes for months.
A properly configured XML sitemap doesn't guarantee indexing, but it eliminates one of the most common and easily preventable reasons pages go undiscovered.
Types of Sitemaps: Which One Do You Need?
| Sitemap Type | Best For | File Format |
|---|---|---|
| XML Sitemap | SEO — Telling search engines which URLs to crawl | .xml |
| HTML Sitemap | User navigation — Helping visitors find pages | .html |
| Image Sitemap | Indexing images in Google Images | .xml extension |
| Video Sitemap | Indexing video content for rich results | .xml extension |
| News Sitemap | Google News publishers requiring fast indexing | .xml extension |
For most websites — blogs, SaaS platforms, e-commerce stores, and business sites — an XML sitemap targeting your core pages is the priority. If your site has significant image assets (photography portfolios, product image-heavy stores), an image sitemap extension adds real value.
How to Create an XML Sitemap: Step-by-Step for 2026
- Audit your site structure first. Know which pages you want indexed. Not every URL should be in your sitemap — exclude admin pages, thank-you pages, filtered category archives, and any page tagged
noindex. - Choose your generation method:
- WordPress: Yoast SEO, Rank Math, or All in One SEO auto-generate and update your sitemap
- Next.js / React: Use the App Router's built-in
sitemap.tsto dynamically generate the sitemap from your database - Static sites: Use a sitemap generator tool to create the file, then upload it manually
- Any website: Use SM Developers' free Sitemap Generator tool to build a sitemap in 60 seconds
- Structure the XML correctly. Each URL entry should include the
<loc>(URL),<lastmod>(last modified date),<changefreq>(update frequency), and<priority>(0.0–1.0 importance score). - Validate the sitemap before submission. A malformed XML file will be rejected. Use Google's Rich Results Test or a dedicated XML validator.
- Submit to Google Search Console. Go to Sitemaps under the Index section, enter your sitemap URL (usually
/sitemap.xml), and submit. - Reference it in robots.txt. Add
Sitemap: https://yourdomain.com/sitemap.xmlto the bottom of your robots.txt file so every crawler — not just Google — can find it automatically.
What to Include (and Exclude) in Your Sitemap
Include:
- Homepage and all primary navigation pages
- All published blog posts and resource articles
- Product and category pages (for e-commerce)
- Tool and feature pages (for SaaS)
- Landing pages targeted at specific keywords
Exclude:
- Paginated archives beyond page 2 (e.g., /blog/page/47/)
- Admin, login, and dashboard URLs
- Thank-you, confirmation, and checkout pages
- Duplicate content pages (filtered, sorted, or parameterized URLs)
- Any URL with a
noindexmeta tag or X-Robots-Tag
A clean sitemap with 50 high-quality URLs signals better to Google than a bloated sitemap with 5,000 URLs — many of which have thin or duplicate content. Quality over quantity always wins.
The Correct XML Sitemap Structure
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://yourdomain.com/</loc>
<lastmod>2026-06-01</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://yourdomain.com/blog/your-article/</loc>
<lastmod>2026-05-20</lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
</urlset>
Sitemap Priority and Change Frequency: What Actually Matters
Two common points of confusion:
Priority (0.0–1.0): This tells Google the relative importance of pages within your own site. It does not affect ranking. Set your homepage to 1.0, key category pages to 0.8–0.9, and blog posts to 0.6–0.7. Pages you include but consider lower value can be 0.3–0.5.
Changefreq: This is a hint, not a command. Google uses it to inform crawl frequency decisions, but if your "daily" frequency page hasn't changed in six months, Googlebot will notice the discrepancy. Set it accurately — or leave it out entirely if you're not sure.
Sitemap Index Files: For Larger Sites
If your site has more than 50,000 URLs (or your sitemap file exceeds 50MB uncompressed), you need a sitemap index file. This is a master XML file that points to multiple individual sitemaps:
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://yourdomain.com/sitemap-posts.xml</loc>
</sitemap>
<sitemap>
<loc>https://yourdomain.com/sitemap-products.xml</loc>
</sitemap>
</sitemapindex>
How to Submit Your Sitemap to Google and Bing
Google Search Console:
- Log in at search.google.com/search-console
- Select your property
- Go to Indexing → Sitemaps
- Enter your sitemap URL and click Submit
Bing Webmaster Tools:
- Log in at bing.com/webmasters
- Go to your site → Sitemaps
- Submit your sitemap URL
Via robots.txt (auto-discovery for all crawlers):
Add this line to the bottom of your robots.txt file: Sitemap: https://yourdomain.com/sitemap.xml
Common Sitemap Errors and How to Fix Them
- "URL not found (404)" — A page in your sitemap returns a 404 error. Remove it from the sitemap or fix the page.
- "URL blocked by robots.txt" — The page is disallowed in robots.txt but listed in the sitemap. Contradiction. Either allow the URL or remove it from the sitemap.
- "Indexed, not submitted in sitemap" — Google found and indexed pages you didn't include. Consider adding important ones.
- "Submitted URL has crawl issue" — Server errors during crawling. Check your hosting and response codes.
For a complete technical audit of your site's crawlability, use the SEO Structure Analyzer alongside your sitemap review.
Key Takeaways
- XML sitemaps accelerate page discovery — critical for new sites and large sites
- Only include canonicalized, indexable, 200-status URLs
- Submit to both Google Search Console and Bing Webmaster Tools
- Reference your sitemap in robots.txt for auto-discovery
- Keep your sitemap clean — fewer quality URLs beats a bloated list
- Use SM Developers' free Sitemap Generator to build one instantly
Does having a sitemap improve Google rankings?
A sitemap doesn't directly improve rankings — but it prevents pages from going undiscovered, which is a prerequisite for ranking at all. Submitted sitemaps are especially important for new domains, large sites, and pages with few internal links pointing to them.
How often should I update my sitemap?
Your sitemap should update automatically whenever you publish or modify content. CMS platforms like WordPress and frameworks like Next.js can auto-generate dynamic sitemaps. If you're using a static file, update and resubmit it via Google Search Console whenever you add or remove significant pages.
What is the maximum number of URLs in a sitemap?
A single XML sitemap file can contain a maximum of 50,000 URLs and must be under 50MB uncompressed. Sites exceeding these limits should use a sitemap index file that references multiple individual sitemaps.
Where should I put my sitemap file?
Your sitemap should be placed at the root of your domain: https://yourdomain.com/sitemap.xml. This ensures both search engines and crawlers can locate it based on the standard discovery convention. Always reference this URL in your robots.txt Sitemap directive.



