All Tools

Sitemap Checker

Enter any domain to automatically locate its sitemap, count declared URLs, check whether lastmod dates are present, and identify structural issues that could be limiting how many of your pages Google discovers and indexes.

What Is an XML Sitemap?

An XML sitemap is a structured file that lists every URL on your site you want search engines to find and index. It sits at the root of your domain, usually at /sitemap.xml, and acts as a direct communication channel between you and search engine crawlers. Without it, crawlers must discover your pages by following internal links, which means pages that are poorly linked internally may never be found at all.

A sitemap does not guarantee indexing. Google uses it as a discovery signal, not an indexing instruction. But for new sites, pages with few inbound links, and sites that publish content frequently, a sitemap is the most reliable way to ensure your pages are considered for indexing. Without one, you are leaving discovery entirely up to the crawler.

What Google Actually Uses From Your Sitemap

Most guides teach you to fill in every sitemap field. Google has publicly confirmed it only uses two of them:

Used
<loc> The URL of the page. This is the only required field. It must be an absolute URL including the protocol (https://).
Used
<lastmod> The date the page content was last significantly changed. Google uses this to prioritise re-crawling updated pages. Important: only update lastmod when the actual content changes. Updating it on every deploy for cosmetic changes like copyright year updates trains Google to ignore your lastmod signals entirely.
Ignored
<priority> A 0.0 to 1.0 value suggesting the importance of this URL relative to others on the site. Google publicly confirmed it ignores this field. Setting all pages to 1.0 has no effect.
Ignored
<changefreq> A hint about how often the page changes. Google confirmed it ignores this field. Do not waste time optimising changefreq values.

Sitemap Index vs Standard Sitemap

A standard sitemap supports up to 50,000 URLs in a single file. When your site grows beyond that, or when you want to monitor different content types separately in Google Search Console, use a sitemap index. A sitemap index is a parent file that references multiple child sitemaps:

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

Each child sitemap can then be submitted and monitored independently in Google Search Console. If your product pages have an indexing problem, it shows up on the products sitemap specifically rather than buried in a 10,000-URL file.

How to Generate a Sitemap in Next.js

In Next.js App Router, create app/sitemap.ts. It exports an async function that returns an array of sitemap entries. For dynamic content, query your database directly inside the function:

// app/sitemap.ts
import { MetadataRoute } from 'next'

export const revalidate = 3600 // regenerate every hour

export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
  const baseUrl = 'https://yoursite.com'

  // Fetch dynamic pages from your database
  const posts = await db.posts.findMany({ where: { published: true } })

  const staticPages = [
    { url: baseUrl, lastModified: new Date(), priority: 1 },
    { url: `${baseUrl}/about`, lastModified: new Date() },
    { url: `${baseUrl}/blog`, lastModified: new Date() },
  ]

  const blogPages = posts.map(post => ({
    url: `${baseUrl}/blog/${post.slug}`,
    lastModified: new Date(post.updatedAt),
  }))

  return [...staticPages, ...blogPages]
}

Submitting Your Sitemap to Google Search Console

After generating your sitemap, declare it in your robots.txt file with a Sitemap: directive so crawlers find it automatically. Then submit it manually in Google Search Console for faster initial discovery. In GSC, go to Sitemaps, enter the full sitemap URL, and click Submit. Google reports how many URLs it found versus how many it actually indexed, which helps diagnose pages that are discovered but not indexing.

Sitemaps and AI Search Visibility

AI crawlers that power tools like Perplexity, ChatGPT with web search, and Claude use sitemaps to discover content for both training and real-time retrieval. A sitemap with accurate lastmod dates signals content freshness, increasing the likelihood that recently published pages get crawled before they become stale. For indie makers trying to get their product pages, blog posts, or tool pages cited in AI-generated answers, a well-maintained sitemap submitted to GSC is the most reliable first step to ensuring all your content is known to exist.

Frequently Asked Questions

Does Google ignore the priority and changefreq fields in XML sitemaps?

Yes. Google has publicly confirmed that it ignores both the <priority> and <changefreq> fields in XML sitemaps. These fields have no effect on how frequently Google crawls your pages or how highly it ranks them. The only sitemap fields Google uses are the URL itself (<loc>) and the last modified date (<lastmod>). Populating priority and changefreq is wasted effort — focus on keeping <lastmod> accurate instead.

What is the difference between sitemap.xml and sitemap_index.xml?

A standard sitemap.xml contains a flat list of URLs, each wrapped in a <url> element. It supports up to 50,000 URLs and must be under 50 MB uncompressed. A sitemap_index.xml (or sitemap index) is a parent file that points to multiple child sitemaps, each of which contains its own list of URLs. Use a sitemap index when your site exceeds 50,000 URLs, or when you want to separate content types (blog posts, product pages, category pages) into independent sitemaps so you can monitor each one separately in Google Search Console.

How do I submit my sitemap to Google Search Console?

In Google Search Console, go to your property, open the Sitemaps section from the left sidebar, enter your sitemap URL (usually /sitemap.xml), and click Submit. Google will crawl it and show you how many URLs were discovered versus how many were indexed. You only need to submit once; Google will re-crawl the sitemap URL periodically after that. Re-submitting after major site changes can speed up recrawling.

Why does my sitemap show fewer URLs than I expect?

Sitemaps should only contain canonical, indexable URLs. Pages with a noindex meta tag, canonical tags pointing elsewhere, redirect URLs, and paginated pages (unless you intend to index each one) should be excluded. If your sitemap count is lower than your total page count, check whether your sitemap generator is correctly filtering non-canonical and noindexed pages. If it is higher than expected, you may have duplicate URLs or pagination entries that should not be included.

How do I generate a sitemap in Next.js?

In Next.js App Router, create a file at app/sitemap.ts that exports a default async function returning an array of sitemap objects. Each object needs a url field and optionally a lastModified date, changeFrequency, and priority (though Google ignores the last two). For dynamic content like blog posts or product pages, query your database inside the function and map each record to a sitemap entry. Next.js compiles this into a valid /sitemap.xml response automatically.

Report a Bug

Something broken?

Send Feedback

Share your thoughts

Request a Feature

What should we build?