Checking your sitemap
A sitemap is a file listing the addresses of your website that you want to appear in search results: a table of contents for search engines. Almost every website builder creates one automatically. Your job is to check that it's correct and that Google and Bing know about it. This article shows you how. We use example.com as an example.
A sitemap is a hint, not a guarantee: Google decides for itself what it crawls and indexes. A sitemap also doesn't replace normal links between your pages. A small site with good internal linking can do without one, but a correct sitemap always helps.
Where is your sitemap?
| Built with | Address |
|---|---|
| AI Builder | https://example.com/sitemap.xml. It's regenerated every time you publish, with all pages that are set to be findable and your news posts. Pages you've set to not findable are left out. |
| WordPress | https://example.com/wp-sitemap.xml. This is an index that points to separate sitemaps for pages, posts and other content. An SEO plugin often replaces it with its own sitemap, for example sitemap_index.xml. |
| Other website builders | Usually /sitemap.xml. Check the Sitemap: line in your robots.txt (see below). |
How to check it
- Open
https://example.com/robots.txtin your browser. Is there a line likeSitemap: https://example.com/sitemap.xml? That's how every search engine finds your sitemap, even one where you don't have an account. The address in that line must be complete, includinghttps://. - Open the sitemap itself. Each page is in a
<url>block with the address in<loc>. Are the pages you expect in there? - Check that every address starts the way your site is actually called: with
https://and with or withoutwww, just like the address your site ends up on. - Click a few addresses. Each page should open directly, without a redirect and without an error.
What should and shouldn't be in it?
Only the addresses you want to see in Google, in their canonical form: the one address you use as the real address of the page. So not:
- addresses that redirect, such as the
http://version or the old name of a page; - addresses that return a 404 or 410;
- pages with noindex: you'd be saying "index this" and "don't index this" at the same time;
- pages you block in robots.txt;
- variants with parameters, such as
?sort=priceor?utm_source=newsletter; - thank-you pages, shopping carts and login pages.
You can read about the difference between noindex and robots.txt in Keeping a page out of Google: robots.txt or noindex?
A few technical rules: full addresses (not /contact but https://example.com/contact), the file in UTF-8, an & in an address written as &, and at most 50,000 addresses and 50 MB per sitemap. If your site is larger, use a sitemap index that points to multiple sitemaps. Google looks at <lastmod> (the date of the last change) if it's accurate, and ignores <changefreq> and <priority>.
Submitting to Google and Bing
- Open your site in Google Search Console and choose Sitemaps.
- Under Add a new sitemap, enter the address of your sitemap and click Submit.
- Do the same in Bing Webmaster Tools. If you imported your site from Search Console, your sitemaps have usually come along already.
Detailed explanation with screenshots: Submitting your sitemap in the Getting found online guide.
Is your site not in Search Console yet? Then first read Verifying Google Search Console with a TXT record: how to avoid mistakes.
Reading the status
| Status in Search Console | Meaning |
|---|---|
| Success | Google was able to read the sitemap. Discovered pages shows how many addresses it contains. That doesn't tell you how many are in Google yet. |
| Has errors | Google was able to read the sitemap, but found errors. Click it for the details. |
| Couldn't fetch | Google couldn't retrieve the file. Check that the address is correct, that it opens in your browser without a redirect and that robots.txt doesn't block it. For a sitemap you've just submitted, this status sometimes shows at first even though everything is fine: Google simply hasn't tried yet. Wait a day. |
Once a sitemap has succeeded, Google rereads it regularly on its own. Resubmitting is only needed after major changes. Want to see which addresses from your sitemap aren't in Google and why? In the Sitemaps report, click your sitemap and choose See page indexing, or check the Page indexing report, see My page isn't in Google: how to figure out why.
Sitemap: line in robots.txt and submitting in Search Console are all you need.Further reading
- Google: Build and submit a sitemap (English)
- Google: Manage your sitemaps using the Sitemaps report
- sitemaps.org: the protocol (English)
- Submitting your website to search engines (Google and Bing)
Using WordPress? Also read the lesson Findability: the basics from the free WordPress course.
Want to learn more? Take the free Getting found online course, lesson 3.4 sitemap.xml: the table of contents for search engines.
