Checking your sitemap
A sitemap is a file with the addresses of your website that you want to see in the search results: a table of contents for search engines. Almost every website builder creates one automatically. Your task is to check whether it's correct and whether Google and Bing know about it. In this article you'll read how. We use example.com as an example.
A sitemap is a hint, not a guarantee: Google decides for itself what it retrieves and includes. A sitemap also doesn't replace regular links between your pages. A small site that is well linked 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 recreated with every publication, with all pages that are findable and your news posts. Pages you've set to not findable are left out. |
| WordPress | https://example.com/wp-sitemap.xml. That's an index that refers to separate sitemaps for pages, posts and other components. 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 way every search engine finds your sitemap, even one where you don't have an account. The address in that line must be complete, withhttps://. - Open the sitemap itself. Each page is listed 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 named: with
https://and with or withoutwww, just like the address your site resolves to. - Click a few addresses. Each page should open directly, without a redirect and without an error message.
What should and shouldn't be included?
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 give a 404 or 410;
- pages with noindex: then you're simultaneously saying "include this" and "don't include this";
- 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 refers to multiple sitemaps. Google looks at <lastmod> (the date of the last change) if it's correct, 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 already come along.
Isn't your site in Search Console yet? Then first read Verifying Google Search Console with a TXT record: here's 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 yet say how many are in Google. |
| Contains errors | Google was able to read the sitemap, but found errors. Click on it for details. |
| Couldn't fetch | Google couldn't retrieve the file. Check whether the address is correct, whether it opens in your browser without a redirect, and whether robots.txt isn't blocking it. For a sitemap you've just submitted, this sometimes shows up first even though everything is fine: Google hasn't tried it yet. Wait a day. |
Google then regularly rereads a successful sitemap on its own. Resubmitting is only needed after major changes. Want to see which addresses from your sitemap aren't in Google and why? Choose View index coverage, or check the Page indexing report, see My page isn't on Google: here's how to find out why.
Sitemap: line in robots.txt and submitting it in Search Console are enough.Further reading
- Google: Build and submit a sitemap (English)
- Google: Manage your sitemaps with 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.
