How to Create an XML Sitemap (and Why It Matters for SEO)
Blog

How to Create an XML Sitemap (and Why It Matters for SEO)

Guide · SEO Tools

A sitemap is a plain XML file listing every page on your site you want search engines to know about. It doesn't guarantee ranking, but it removes a common failure point: pages that exist but never get discovered because nothing links to them clearly enough for a crawler to find on its own.

Why it matters

What a valid sitemap looks like

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

Building yours

  1. List every URL you want indexed with the Sitemap Generator — paste in your page list or URLs.
  2. Download the generated sitemap.xml and upload it to your site's root directory.
  3. Submit the sitemap URL (e.g. https://yoursite.com/sitemap.xml) in Google Search Console and Bing Webmaster Tools.
  4. Reference it in your robots.txt file with a line like Sitemap: https://yoursite.com/sitemap.xml so crawlers that don't check Search Console directly can still find it.

Keeping it accurate

A sitemap listing pages that no longer exist, or missing pages that were added recently, works against you — search engines can start trusting the file less if it's frequently wrong. Regenerate it whenever you add, remove, or restructure a meaningful number of pages.