Help us fix this page

If you found a broken link, missing page, or incorrect redirect, please let us know. Your report helps us improve the website for everyone.

Report Broken Link

Your report is used solely to investigate website issues. Any personal data you provide is processed in accordance with our Privacy Policy.

Let’s Build Something Great

Tell us about your goals and request a free project estimate.

Request a Quote

By clicking submit, you agree to the processing of your data as described in our Privacy Policy. This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Ultimate sitemap guide for beginners

A sitemap is an XML file that lists the URLs on your site and provides metadata about each URL—when it was last updated, how frequently it changes, and its relative importance. Search engines like Google read this file to crawl your site more efficiently.

While Google can usually discover most pages through proper internal linking, a sitemap improves crawling for larger or more complex sites, new sites with few external links, and sites with rich media content like video, images, or news articles.

This guide covers the types of sitemaps, why they matter for SEO, how to create and submit them, and best practices for keeping them effective.

TL;DR

  • Sitemap size limits are 50 MB (uncompressed) or 50,000 URLs per file—exceed either and you must split into multiple sitemaps using a sitemap index file.
  • Submit your sitemap in Google Search Console and reference it in robots.txt—Search Console provides detailed indexing reports; robots.txt ensures all crawlers can discover it passively.
  • Google deprecated the sitemap ping endpoint in 2023—HTTP “pings” to the old REST endpoint now return a 404 error. Use Search Console or robots.txt instead.
  • Only include canonical, indexable URLs in your sitemap—avoid noindex pages, redirects, and non-indexable content. Google also ignores the changefreq and priority tags.
  • XML is the most versatile sitemap format—it’s extensible and can supply additional data about images, video, and news content.

What Is a Sitemap?

A sitemap is a file where you provide information about the pages, videos, and other files on your site, and the relationships between them. Search engines read this file to crawl your site more efficiently.

Sitemaps tell search engines which pages and files you consider important and provide valuable information about these files—for example, when the page was last updated and any alternate language versions.

Why Sitemaps Matter

BenefitExplanation
Improved indexingEnsures Google can find and index all pages, especially for large or complex sites
Faster discoveryNew or updated content is discovered more quickly
Rich media supportProvides additional information about video, image, and news content
Crawl efficiencyHelps bots prioritize important pages over less critical ones

Do You Need a Sitemap?

You might need a sitemap if:

  • Your site is large (generally over 500 pages)—it’s harder to ensure every page is linked internally
  • Your site is new and has few external links—Googlebot may not discover your pages otherwise
  • Your site has rich media content (video, images) or appears in Google News

You might not need a sitemap if:

  • Your site is small (about 500 pages or fewer)
  • Your site is comprehensively linked internally—Googlebot can find all important pages from the home page
  • You don’t have many media files or news pages you want indexed

Even if you don’t strictly need one, having a sitemap rarely hurts and provides a clear signal to search engines about your content priorities.

Types of Sitemaps

XML Sitemap

The most common and versatile format. XML sitemaps are extensible and can supply additional data about images, video, and news content.

Best for: All websites.

Pros:

  • Extensible and versatile
  • Provides the most information about your URLs
  • Most CMS platforms generate sitemaps automatically

Cons:

  • Can be cumbersome to work with on larger sites

Image Sitemap

Helps Google index images on your website by providing the location of images included in a page.

Best for: Image-heavy websites, photography portfolios, e-commerce sites with product images.

How it works: Add image URLs to your XML sitemap using the image namespace, and Googlebot can index these images for Google Image Search.

Video Sitemap

Provides additional information about videos hosted on your pages, including running time, rating, and age-appropriateness rating.

Best for: Video-focused websites, online learning platforms, media publishers.

Key requirements:

  • Don’t list videos unrelated to the host page content
  • All video files must be accessible to Googlebot (not blocked by robots.txt, firewalls, or login requirements)

News Sitemap

Helps Google News discover and index your articles quickly.

Best for: News websites, blogs publishing daily updates.

Key requirements:

  • Only include articles published in the last two days
  • Update with fresh articles as they’re published
  • Remove older URLs once articles pass the two-day window

Sitemap Index File

A file that lists multiple sitemap files. Required when you exceed the 50,000 URL or 50 MB size limit.

Best for: Large websites, e-commerce sites, or sites with multiple content types.

Limits: You can submit up to 500 sitemap index files per site, and each index file can reference up to 50,000 sitemaps.

Sitemap Size Limits

All sitemap formats limit a single sitemap to:

LimitValue
URLs per sitemap50,000
File size (uncompressed)50 MB

If you exceed either limit, you must break your sitemap into multiple sitemaps and optionally create a sitemap index file.

Pro tip: For sites with 1,000–5,000 URLs, there’s no need to split. For larger sites, consider splitting by content type (e.g., posts, products, categories) for better tracking in Search Console.

How to Create a Sitemap

CMS-Generated Sitemaps

Most CMS platforms generate sitemaps automatically:

PlatformSitemap Location
WordPress (Yoast SEO)yourdomain.com/sitemap_index.xml—updates automatically when you publish, modify, or delete posts
WordPress (Rank Math)yourdomain.com/sitemap_index.xml
Shopifyyourdomain.com/sitemap.xml

Custom Websites

For custom-built sites, you can generate a sitemap using:

  • Screaming Frog SEO Spider—crawls your site and exports sitemap files
  • XML-Sitemaps.com—online generator for smaller sites
  • Custom scripts—using Python, PHP, or other languages with the sitemap protocol

Sitemap Format

XML sitemaps use the following structure:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
 <url>
 <loc>https://example.com/page1</loc>
 <lastmod>2026-08-01</lastmod>
 </url>
 <url>
 <loc>https://example.com/page2</loc>
 <lastmod>2026-07-15</lastmod>
 </url>
</urlset>

Important notes:

  • The sitemap file must be UTF-8 encoded
  • You can host your sitemap anywhere on your site, but it must be accessible to Googlebot
  • Google ignores the changefreq and priority tags in 2026—focus on including the right URLs rather than worrying about these values

How to Submit a Sitemap to Google

Google deprecated the sitemap ping endpoint in 2023—HTTP “pings” to the old REST endpoint now return a 404 error. You must submit sitemaps through Search Console, robots.txt, or both.

Method 1: Google Search Console

  1. Sign in to Google Search Console and select your property
  2. In the left sidebar, click IndexingSitemaps
  3. Enter your sitemap URL in the Add a new sitemap field
  4. Click Submit

Method 2: robots.txt

Add a Sitemap directive to your robots.txt file:

User-agent: *
Allow: /
Sitemap: https://www.yourwebsite.com/sitemap.xml

The Sitemap directive is independent of User-agent blocks and applies globally—it’s the most efficient way to communicate the sitemap’s existence to all crawlers simultaneously.

Best practice: Use both methods. Declaring the sitemap in robots.txt ensures all crawlers find it passively, and Search Console provides detailed indexing reports.

Sitemap Best Practices

1. Only Include Canonical, Indexable URLs

Your sitemap should only include:

  • Canonical URLs—the version you want indexed
  • Indexable URLs—pages that return a 200 status code and are not marked with noindex
  • Clean HTTPS URLs—avoid listing URLs that redirect

Avoid including:

  • Pages with noindex tags
  • URLs that redirect (301/302)
  • Duplicate content variations
  • Paginated pages (unless you want them indexed separately)
  • Search result pages
  • Login or admin pages

2. Keep Sitemaps Updated

  • Dynamic sitemaps that update automatically are best for blogs, e-commerce sites, and any site publishing content regularly
  • For CMS platforms like WordPress, the Yoast SEO plugin updates the sitemap whenever you publish, modify, or delete content
  • For custom sites, implement a script that regenerates the sitemap on content changes

3. Use Sitemap Index Files for Large Sites

If you exceed 50,000 URLs or 50 MB, split your sitemap and use a sitemap index file:

<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
 <sitemap>
 <loc>https://example.com/sitemap-posts.xml</loc>
 <lastmod>2026-08-01</lastmod>
 </sitemap>
 <sitemap>
 <loc>https://example.com/sitemap-products.xml</loc>
 <lastmod>2026-07-15</lastmod>
 </sitemap>
</sitemapindex>

Requirements:

  • Referenced sitemaps must be in the same directory as the index file, or lower in the site hierarchy
  • The index file can reference up to 50,000 sitemaps

4. Align Sitemaps with Robots.txt

Ensure your sitemap doesn’t list URLs that are blocked in robots.txt—this sends mixed crawl signals. Googlebot won’t crawl URLs that are disallowed, even if they appear in the sitemap.

5. Use Canonical Tags Wisely

Don’t specify different URLs as canonical for the same page using different techniques. For example, don’t specify one URL in a sitemap but a different URL for that same page using rel=”canonical”. Consistency matters.

6. Monitor Sitemap Performance in Search Console

Use Google Search Console’s Sitemaps report to:

  • Check which sitemaps were processed successfully
  • View the number of discovered and indexed URLs
  • Identify errors and warnings
  • Track index coverage over time

Common Sitemap Issues and Fixes

IssueCauseFix
Sitemap format errorsInvalid XML syntaxValidate with W3C validator or Search Console’s sitemap report
Too many URLsExceeds 50,000 URL or 50 MB limitSplit into multiple sitemaps and use a sitemap index file
Broken linksURLs in sitemap return 404 or 5xxRemove or update broken URLs
Excluded pagesPages in sitemap have noindex or are blocked by robots.txtRemove excluded pages from sitemap
Empty sitemap warningNo recent articles in news sitemapNormal for news sitemaps during low publication periods—won’t cause issues

Key Takeaways

  1. Sitemaps are not required for small, well-linked sites—but they help large sites, new sites, and sites with rich media content.
  2. Size limits are 50,000 URLs and 50 MB (uncompressed)—exceed either and you must split into multiple sitemaps with an index file.
  3. Google deprecated the sitemap ping endpoint in 2023—submit sitemaps through Search Console or robots.txt only.
  4. XML is the most versatile sitemap format—extensible for images, video, news, and localized content.
  5. Only include canonical, indexable URLs—avoid noindex pages, redirects, and duplicate content.
  6. Google ignores changefreq and priority tags in 2026—focus on including the right URLs.
  7. Use both Search Console and robots.txt for sitemap submission—they serve different purposes.
  8. Monitor sitemap performance in Search Console regularly to catch issues early.

Conclusion

Sitemaps remain a vital tool for helping search engines discover, crawl, and index your content efficiently. While they’re not required for every site, they provide clear benefits for larger sites, new sites, and sites with rich media content.

The fundamentals haven’t changed dramatically: XML sitemaps are the most versatile format, size limits are 50,000 URLs and 50 MB, and you should only include canonical, indexable URLs. Google Search Console provides the most detailed sitemap reporting, and referencing sitemaps in robots.txt ensures all crawlers can find them.

What has changed is the deprecation of the sitemap ping endpoint in 2023—you must now submit through Search Console or robots.txt. And in 2026, Google ignores changefreq and priority tags, so focus on getting the right URLs into your sitemap rather than worrying about metadata.

Resources

Need help with your technical SEO? Playful Sparkle has been engineering digital products since 2004, offering SEO & Digital Marketing, Web Development, and technical consulting services. Our team can help you audit and optimize your sitemaps, crawl budget, and overall technical SEO strategy. Contact us to discuss how we can help you improve your site’s search visibility.

Was this helpful - Post
Zsolt Oroszlány

Zsolt Oroszlány

Founder & Chief Creative Officer of Playful Sparkle since 2004, combining business leadership, digital strategy, design, and software engineering to help organizations build effective digital solutions. Regularly publishes insights on web development, SEO, design, and emerging technologies.