Guides · Search
How to add a working sitemap
A sitemap is a file that lists the pages you want search engines to find. Its usual address is /sitemap.xml.
Google says a small, well-linked site of about 500 pages or fewer may not need one. It can help a new site with few outside links. Listing a page does not guarantee that the page will appear in search results.
What we check
We open your robots.txt file first and look for a line that starts with Sitemap:. If there is no such line, we try /sitemap.xml.
- Missing means robots.txt names no sitemap, and
/sitemap.xmlis not found or is not a sitemap. You may still have one at another address, which we would not find. - Broken means robots.txt names a sitemap, and that address is not found or holds another kind of document.
If robots.txt names several, one that works is enough. A timeout or a blocked request does not count against you. We do not test each page listed inside the file.
Where your sitemap comes from
- WordPress: since version 5.5 it has a sitemap at
/wp-sitemap.xml, and its own robots.txt names that address. The "Discourage search engines" option in Settings, under Reading, turns it off. Yoast and Rank Math use/sitemap_index.xmlin place of it. In Rank Math, check that the sitemap module is on. If that address returns a 404, Rank Math suggests saving your permalinks again. - Shopify: every store gets
/sitemap.xmlautomatically. Search engines cannot read it while the store is in private mode. - Wix: it creates a sitemap for you, usually at
/sitemap.xml. - Squarespace: it creates one at
/sitemap.xml, and you cannot edit it.
On other sites, ask your developer or host for this: "Publish a sitemap at /sitemap.xml and add a Sitemap line to robots.txt."
How to fix it
- Open
/robots.txton your domain in a browser and look for a Sitemap line. - Open that address, or
/sitemap.xmlif there is no line. You should see a list of addresses, which may look like plain code. It may list further sitemaps, which is also fine. If you see your "page not found" page or your home page, it is not working. - If the line names an old address, correct it. This often follows a site move or a plugin change.
- If your sitemap is at another address and no line names it, add one with the full address:
Sitemap: https://www.example.com/sitemap_index.xml
WordPress writes its own robots.txt unless a real file has been uploaded to the site. If one has, edit that file.
How to check
Open the sitemap address again and confirm that your pages are listed. If you use Google Search Console, enter the address in its Sitemaps section so that Google reports any problems it finds. A rescan tests the file again.