SiteCheck

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.

From robots.txt to a sitemapA line in robots.txt names the sitemap address. If that address opens a list of pages, it works. If it is not found or opens an ordinary web page, the report calls it broken. robots.txtSitemap: https://example.com/sitemap.xml WorksOpens a list of pages://about/shoes BrokenNot found, or it opensan ordinary web page
We follow the address in robots.txt and look at what comes back.

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

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

  1. Open /robots.txt on your domain in a browser and look for a Sitemap line.
  2. Open that address, or /sitemap.xml if 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.
  3. If the line names an old address, correct it. This often follows a site move or a plugin change.
  4. 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.