Skip to content
SEO-Wars

Technical

XML sitemap: list the pages you want crawled

An XML sitemap helps search engines find all your important pages. Publish /sitemap.xml or reference your sitemap in robots.txt.

Category
Technical
Points available
2 pts
Effort
Quick fix

Why it matters

A sitemap lists your canonical URLs in one place, so search engines discover new and deep pages faster, even if internal linking is weak.

With a lastmod date it also tells crawlers what changed, so updates get picked up sooner.

How we measure it

You pass if robots.txt contains a Sitemap: line, or if /sitemap.xml returns 200 and looks like XML (an urlset, sitemap index or XML declaration).

ResultPoints
Sitemap found2
No sitemap found0

How to fix it

  1. Generate a sitemap: WordPress (since 5.5), Shopify and most frameworks do it automatically; Next.js uses app/sitemap.ts.
  2. Add Sitemap: https://www.example.com/sitemap.xml to robots.txt, especially if your sitemap is not at /sitemap.xml (WordPress core uses /wp-sitemap.xml).
  3. Submit it in Google Search Console and Bing Webmaster Tools.

Copy-paste fixes

robots.txtrobots.txt
Sitemap: https://www.example.com/sitemap.xml
Next.jsapp/sitemap.ts
import type { MetadataRoute } from "next";

export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
  const posts = await getPosts();
  return [
    { url: "https://www.example.com/", lastModified: new Date() },
    ...posts.map((post) => ({ url: `https://www.example.com/blog/${post.slug}`, lastModified: post.updatedAt })),
  ];
}

Common mistakes

  • Listing redirected, noindexed or 404 URLs in the sitemap.
  • Using a relative URL in the Sitemap: line. It must be absolute.
  • Setting lastmod to the current time on every request, which makes it useless.

Test your site now

Put your site against a competitor and see how many of these points you earn, and which fixes pay off first.

Start a duel
← All checksUpdated December 1, 2026
Sitemap: why it matters and how to fix it · SEO-Wars