Skip to main content

Add an XML sitemap

About 15 min

A sitemap lists the URLs you want found. Reference it from robots.txt. Follow the steps below on your stack, then re-check the live URL.

A sitemap lists the URLs you want found. Reference it from robots.txt.

We remember this on this browser so the next guide opens with the same CMS.

At a glance

Time~15 min
CategorySEO
Steps3
StacksWordPress, Shopify, Webflow, Next.js, HTML, more

Steps

  1. Publish an XML sitemap (often /sitemap.xml) listing indexable URLs only.

  2. Skip 404s, redirects, and noindex URLs.

  3. Add Sitemap: https://yoursite.com/sitemap.xml to robots.txt.

In HTML / static

Serve /robots.txt at the origin with Allow rules for retrieval crawlers.

Snippet
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url><loc>https://yoursite.com/this-page</loc></url>
</urlset>

FAQ

What does “Add an XML sitemap” fix?
A sitemap lists the URLs you want found. Reference it from robots.txt.
How long does this usually take?
About 15 minutes on most CMS and code stacks when you already have access to edit the page.
Where do I start?
Start with: Publish an XML sitemap (often /sitemap.xml) listing indexable URLs only. Then use the platform picker on this page for placement notes.