technical seo 6 min read

What Is an XML Sitemap and Why Does Your Site Need One

An XML sitemap tells Google which pages exist on your site and when they were last updated. Without one, Google may miss or delay indexing your most important pages.

By Vishwas Bhimani · 18 March 2026

An XML sitemap is one of the most important technical SEO files on your website. Without one, Google may miss or significantly delay indexing your most important pages — especially on new or content-heavy sites. This guide explains what an XML sitemap is, what to include, and how to submit it to Google correctly.

What Is an XML Sitemap?

An XML sitemap is a file that lists all the URLs on your website that you want search engines to crawl and index. It acts as a roadmap for Google's crawlers — instead of discovering your pages by following links, Google can read your sitemap and find every page you want indexed, even if some are not well linked internally.

A basic XML sitemap looks like this:

<?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-04-01</lastmod>
    <priority>1.0</priority>
  </url>
</urlset>

Why Does Your Site Need a Sitemap?

Sitemaps are especially important for:

  • New websites — Google has not had time to crawl and discover all your pages yet
  • Large websites — hundreds of pages that might not all be reachable via internal links
  • Sites with thin internal linking — if some pages have no links pointing to them
  • Sites with frequently updated content — blogs, news sites, tool pages

Even if Google would eventually find all your pages without a sitemap, submitting one speeds up the process and ensures nothing gets missed.

What to Include in Your Sitemap

Include all pages you want indexed:

  • Homepage
  • Tool pages
  • Blog posts
  • About, Contact, Privacy Policy pages

Do not include:

  • Pages blocked by robots.txt
  • Duplicate content pages
  • Pages with a noindex tag
  • Redirect URLs
  • Admin or login pages

How to Submit Your Sitemap to Google

  1. Create or locate your sitemap (usually at yourdomain.com/sitemap.xml)
  2. Open Google Search Console
  3. Go to Sitemaps in the left menu
  4. Enter your sitemap URL and click Submit
  5. Google will process it within a few days and show how many URLs were indexed

Sitemap vs Robots.txt

These two files serve opposite purposes. Your sitemap tells Google what to crawl. Your robots.txt tells Google what not to crawl. Both are important — use your sitemap to highlight your best content and your robots.txt to block admin areas, duplicate pages and internal search results. Use our free Robots.txt Generator to create a properly formatted robots.txt file for your site.

Keep Your Sitemap Updated

Every time you publish a new blog post or add a new page, make sure your sitemap is updated. Most CMS platforms (WordPress, Laravel, etc.) can auto-generate and update sitemaps. If yours does not, add the new URL manually and re-submit to Google Search Console.

What to Include and Exclude From Your Sitemap

IncludeExclude
HomepagePages blocked by robots.txt
All tool pagesPages with noindex tag
All published blog postsRedirect URLs (301/302)
About, Contact, Privacy PolicyAdmin and login pages
Category and index pagesDuplicate content pages

According to Google's sitemap documentation, submitting a sitemap is especially important for new websites and sites with large amounts of content. Google can discover content through links, but a sitemap ensures nothing gets missed.

Types of Sitemaps

Depending on your site type, you may need more than a basic XML sitemap:

  • XML Sitemap — the standard type, listing all page URLs with optional lastmod, changefreq, and priority values
  • Image Sitemap — lists images on your site to help Google discover and index them for Google Images traffic
  • Video Sitemap — for sites with embedded videos that you want indexed in Google Video search
  • News Sitemap — for news publishers to help Google News discover recently published articles quickly
  • Sitemap Index — a sitemap of sitemaps, used when a single site has more than 50,000 URLs or the sitemap file exceeds 50MB

For most content and tool sites, a single XML sitemap is sufficient. Ensure it is regenerated automatically when new content is published and that the URL is listed in your robots.txt file: Sitemap: https://yourdomain.com/sitemap.xml

Sitemap Best Practices for Content Sites

For blogs and content-heavy sites, follow these additional sitemap best practices:

  • Use lastmod accurately — the lastmod field should reflect when the page content was meaningfully updated. Do not use it as a trick to get Google to re-crawl pages that have not changed. Accurate lastmod values help Google prioritise which pages to re-crawl.
  • Limit sitemap size — a single sitemap file should not exceed 50,000 URLs or 50MB. For larger sites, use a sitemap index that points to multiple sitemap files.
  • Reference your sitemap in robots.txt — add Sitemap: https://yourdomain.com/sitemap.xml to your robots.txt file. This helps all search engine crawlers (not just Google) discover your sitemap automatically.
  • Only include indexable pages — if a page has a noindex tag, do not include it in the sitemap. Including noindexed pages creates a confusing signal: the sitemap says "index this" but the meta tag says "do not index this." Remove these URLs from your sitemap to avoid confusion.
  • Check the submitted vs indexed ratio in GSC — if you submitted 50 pages but only 30 are indexed, investigate why 20 pages are being excluded. Common reasons are thin content, duplicate content, or soft 404 errors.

For a Laravel site, the sitemap is typically auto-generated and accessible at /sitemap.xml. Verify that all published blog posts and tool pages appear in your sitemap and that no draft or unpublished pages are included.

Common Sitemap Errors to Fix

After submitting your sitemap to Google Search Console, check the Sitemaps report regularly. Common issues include:

  • Submitted URLs not indexed — Google crawled the pages from the sitemap but decided not to index them (thin content, duplicate content, or quality issues)
  • URLs in sitemap returning 404 — pages that have been deleted or moved should be removed from the sitemap
  • Noindex URLs in sitemap — a page cannot both be in your sitemap (indexing signal) and have a noindex tag (exclusion signal). Remove these URLs from the sitemap
  • Redirect URLs in sitemap — update redirected URLs to their final destination URL in the sitemap
  • Sitemap URL count discrepancy — if GSC shows fewer indexed URLs than submitted, investigate which pages are excluded and why

Dynamic Sitemaps vs Static Sitemaps

There are two approaches to maintaining an XML sitemap: a static file you update manually or a dynamic sitemap generated automatically by your CMS or framework. For almost all content sites, a dynamic sitemap is strongly preferred.

Static sitemaps are XML files you create and update manually. They work fine for very small sites (under 20 pages) that rarely change. The major disadvantage is maintenance — every time you publish new content, update a URL, or remove a page, you must manually update the sitemap. It is easy to forget, leaving stale or missing URLs.

Dynamic sitemaps are generated automatically by your CMS or application. WordPress generates dynamic sitemaps through plugins like Yoast SEO or Rank Math. Laravel sites can use packages like spatie/laravel-sitemap that auto-generate the sitemap on a schedule. Dynamic sitemaps always reflect the current state of your site — new posts appear immediately, deleted pages are removed, and updated timestamps are accurate.

For dynamic sitemaps, consider regenerating on a schedule (daily or after every content publish) and verify the output regularly. A common issue is that the sitemap regeneration job fails silently, leaving an outdated sitemap in place for weeks. Set up a monitoring alert that checks your sitemap URL daily and notifies you if it returns an error or if the last-modified date becomes stale.

Submit your sitemap URL (e.g. https://yourdomain.com/sitemap.xml) in Google Search Console under Sitemaps, and also add it as a directive in your robots.txt file: Sitemap: https://yourdomain.com/sitemap.xml. This ensures all crawlers can find it, not just those that check GSC.

Frequently Asked Questions

Does every website need an XML sitemap?

Not strictly required, but strongly recommended — especially for new sites and content-heavy sites. Without a sitemap, Google relies entirely on following links to discover your pages. A sitemap ensures Google knows about every page you want indexed, regardless of your internal linking structure.

How do I submit a sitemap to Google?

Log into Google Search Console → Sitemaps (in the left sidebar) → enter your sitemap URL (usually yourdomain.com/sitemap.xml) → click Submit. Google will process it and show how many URLs were submitted vs indexed within a few days.

How often should I resubmit my sitemap?

You do not need to resubmit every time you add content — Google periodically re-fetches submitted sitemaps automatically. However, resubmitting after major content additions or site restructuring can speed up the crawling of new pages.

What is the difference between a sitemap and robots.txt?

Your sitemap tells Google what to crawl (it is a list of pages you want indexed). Your robots.txt tells Google what not to crawl (pages to ignore). They serve opposite purposes and should both be properly configured. The sitemap URL should be referenced in your robots.txt file for easy discovery.

Put This Into Practice

Use our free SEO tools to apply what you just read. No signup required.

V

Vishwas Bhimani

Vishwas Bhimani is a web developer and digital entrepreneur from India. He builds websites, mobile apps, and online tools — and created SearchRankTool to make professional SEO analysis free and accessible for everyone.

Back to Blog