Learn · Technical SEO · Beginner

How to create, submit and check a sitemap

Find out whether your site already has a sitemap, make one if it does not, tell Google where it is, and check that Google can read it.

By Dean Cruddace · 30 minutes to do · Updated · Last reviewed

What a sitemap is

A sitemap is a file on your website that lists the pages you want search engines to know about. Google says search engines read it to crawl your site more efficiently. Crawling means a search engine's robot visiting your pages.

It is not an instruction Google must obey. Google says a sitemap helps search engines discover URLs, but does not guarantee that everything in it will be crawled and indexed.

Why a sitemap matters for crawling

Google says that if your pages are properly linked, it can usually find most of your site on its own. A sitemap helps most on large or complex sites, and on new sites with few links from elsewhere. You might not need one if your site has about 500 pages or fewer that matter for search and every important page is reachable by links from the home page. See Google's introduction to sitemaps.

What you need to create, submit and check a sitemap

  • Access to Google Search Console for your site, with owner permission if you want to submit through the Sitemaps report
  • The ability to view your site in a web browser
  • A list of the pages you want to appear in search results

Create, submit and check a sitemap, step by step

  1. 1

    Find out whether you already have a sitemap

    Google says that if you use a CMS (content management system) such as WordPress, Wix or Blogger, it is likely your CMS has already made a sitemap. Search for how your CMS handles sitemaps and note the address. Google does not name a standard address, but adding /sitemap.xml to your domain is a common convention that sometimes works. Source: Build and submit a sitemap.

    You will know it worked when You can open a sitemap address in your browser and see a list of your page addresses. If not, go to step 3.

  2. 2

    Decide which pages belong in it

    Google says a sitemap tells search engines which URLs you prefer to show in results: the canonical URLs. If the same content is reachable at several addresses, list only the preferred one. Use full addresses such as https://www.example.com/mypage.html, not /mypage.html.

    You will know it worked when You have a list of full page addresses, one per page, with no duplicate versions.

  3. 3

    Create the file if you do not have one

    Let your CMS generate it; or, for fewer than a few dozen pages, write it by hand in a text editor; or, for more, have your website software produce it. Google accepts XML, RSS or Atom feeds and plain text, with no preference. The simplest is a text file with one address per line and nothing else, such as sitemap.txt. Save it as UTF-8 at the root of your site, where Google recommends posting it. Source: Build and submit a sitemap.

    You will know it worked when The file's address opens in your browser and shows your list of pages, not an error or a login screen.

  4. 4

    Test that Google can fetch it

    In Search Console, paste the sitemap address into the URL Inspection box and run a live test. Google says to check that Page fetch reads "Successful". The sitemap must not sit behind a login or be blocked by robots.txt, because Google respects robots.txt when fetching sitemaps. Source: Sitemaps report help.

    You will know it worked when The live test shows Page fetch as Successful.

  5. 5

    Tell Google where it is

    Open the Sitemaps report, paste the address into Add a new sitemap and click Submit. This only tells Google where the file is, and Google calls it a hint. You need owner permission. Without it, add a line such as Sitemap: https://example.com/my_sitemap.xml anywhere in your robots.txt file instead, and Google will find it on its next crawl of that file. Sources: Sitemaps report help, Build and submit a sitemap.

    You will know it worked when Your sitemap appears in the Sitemaps report table. One found only through robots.txt does not.

  6. 6

    Read the status

    Look at the Status column. Success means it was processed with no errors. Has errors means it was fetched but has problems; click the row for the list. Couldn't fetch means Google could not retrieve it; causes Google lists include a robots.txt block and a wrong address (404). Fix the cause and resubmit.

    You will know it worked when The status reads Success and Last read shows a date.

  7. 7

    Compare what you listed with what Google found

    Discovered pages is the number of page addresses Google parsed from the file, with no guarantee any were crawled or indexed. To see how many are indexed, filter the Page indexing report by your sitemap, as Google's help page describes.

    You will know it worked when You can state two numbers: pages listed, and pages Google reports as indexed.

  8. 8

    Keep it accurate

    Replace redirect addresses with the addresses that should actually be crawled. One file holds at most 50MB uncompressed or 50,000 URLs; beyond that, split it and submit a sitemap index file. Google uses lastmod dates only if they are consistently and verifiably accurate, so do not stamp every page with today's date. It ignores priority and changefreq.

    You will know it worked when A handful of addresses from the file open live pages with no redirects or errors.

Common mistakes when you create, submit and check a sitemap

  • Assuming that listing a page guarantees it will be crawled or indexed. Google says it does not.
  • Listing several versions of the same page instead of only the preferred one.
  • Leaving redirected or broken addresses in the file instead of the final addresses.
  • Blocking the sitemap in robots.txt or putting it behind a login, so Google cannot fetch it.

Terms used when you create, submit and check a sitemap

Sitemap
A file listing the pages on your site that you want search engines to know about.
Canonical URL
The one address you prefer for a page when the same content can be reached at several addresses.
robots.txt
A file at the root of your site that tells crawlers which parts they may visit; it can also point to your sitemap.
Sitemap submitted, but pages still not showing up?

Describe what the Sitemaps and Page indexing reports say for your site and what you have already changed. A focused audit is a common way to begin when indexing is the question.

Talk to an SEO specialistTechnical SEO: crawling and indexing →