A sitemap.xml file is one of the simplest things you can add to your website to help search engines find and understand your pages. This guide covers what it is, why it matters, and how to create one in a few minutes.

What Is a Sitemap.xml File?

A sitemap.xml file is a list of your website's pages, written in a format search engines can read. It sits at your domain root - for example, yourwebsite.com/sitemap.xml - and tells crawlers like Googlebot which pages exist on your site.

Think of a sitemap as a table of contents for your website. Instead of a search engine having to stumble across your pages by following links, you're handing it a direct list.

Why Does Your Website Need One?

Search engines can usually find pages by following links from one to another. But a sitemap makes this faster and more reliable, especially in a few common situations:

  • Your site is new and doesn't have many external links pointing to it yet
  • Your site has a lot of pages, or pages that aren't well connected by internal links
  • You've recently added or changed pages and want search engines to notice sooner

What Does a Sitemap Look Like?

A basic sitemap is an XML file listing your page URLs, like this:

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

You don't need to write this by hand - a sitemap generator does this automatically.

How to Create a Sitemap

  1. Use a sitemap generator tool to crawl your website and produce the file
  2. Download the resulting sitemap.xml file
  3. Upload it to the root folder of your website (the same location as your homepage)
  4. Confirm it loads by visiting yourwebsite.com/sitemap.xml directly in your browser
Your sitemap should only include pages you actually want indexed. Don't include admin pages, duplicate content, or pages you've deliberately blocked in robots.txt - including them in your sitemap while blocking them elsewhere sends search engines mixed signals.

How to Submit Your Sitemap to Google

  1. Verify your website in Google Search Console
  2. Go to the "Sitemaps" section in the left-hand menu
  3. Enter "sitemap.xml" and click Submit

Google will periodically re-check your sitemap after that, so you don't need to resubmit it every time you add a page - though it's worth doing again after major site changes.

Frequently Asked Questions

Does having a sitemap guarantee my pages will be indexed?

No - a sitemap helps search engines discover your pages, but indexing still depends on other factors like content quality and whether the page is accidentally blocked elsewhere.

How often should I update my sitemap?

Whenever you add, remove, or significantly restructure pages. For a site that rarely changes, this might be a few times a year; for one that publishes regularly, more often.

Can I have more than one sitemap?

Yes - large sites sometimes split sitemaps into multiple files (for example, one for products and one for blog posts) with a sitemap index file linking them together. Most small to medium sites only need one.

Ready to put this into practice?

Use our free Website SEO Checker โ€” no signup required.

Open Website SEO Checker โ†’

Ready to put this into practice?

Use our free Robots.txt Generator โ€” no signup required.

Open Robots.txt Generator โ†’

Ready to put this into practice?

Use our free Sitemap Generator โ€” no signup required.

Open Sitemap Generator โ†’