Sitemap
Does a valid sitemap show Google all pages of the website, without broken addresses and redirects?
What we check
We look for the sitemap in the usual places: in the robots.txt, at /sitemap.xml and at /sitemap_index.xml. If it contains further sitemaps, we read up to five of them. Then we check:
- whether the sitemap is valid XML,
- whether it is linked in the robots.txt,
- whether the addresses work: we request up to 10 of them and report errors and redirects,
- whether the modification dates (
lastmod) are plausible, that is not in the future and not the same everywhere, - whether addresses of a foreign domain are included.
Why it matters
The sitemap is a directory of all the pages Google should know. Search engines also find pages by following links, but pages that are rarely linked, such as individual reference projects, job offers or products, are found faster and more reliably with a sitemap.
A faulty sitemap does more harm than good:
- Broken addresses show Google that the sitemap is not maintained. Google then trusts it less.
- Redirects do not belong in it, only the target addresses.
- Implausible modification dates are ignored by Google, so the sitemap loses part of its benefit.
- Foreign addresses point to a copied or outdated sitemap, for example from a test environment.
How to fix it
Never create the sitemap by hand, have it generated automatically. Then it stays up to date.
WordPress
Since version 5.5 WordPress generates a sitemap itself at /wp-sitemap.xml. SEO plugins such as Yoast SEO or Rank Math replace it with a better one at /sitemap_index.xml. Exclude pages there that should not appear on Google, such as thank-you pages.
Wix, Jimdo, Squarespace
The builders create the sitemap automatically at /sitemap.xml. You do not have to do anything except submit it in Google Search Console.
Link it in the robots.txt
Add a line with the full address to the robots.txt:
Sitemap: https://www.example.ch/sitemap.xml
Submit it to Google
Register the sitemap in the free Google Search Console under "Sitemaps". There you also see how many pages Google has taken from it and which errors there are.
How to check it yourself
Open https://example.ch/sitemap.xml in the browser. You should see a list of addresses. Spot checks from it should open without errors.
Frequently asked questions
Does my website not appear on Google without a sitemap?
It does. Google also finds pages through links. With a sitemap, new and more deeply linked pages are found faster and more completely, though.
Do I have to recreate the sitemap after every change?
No, if it is generated automatically. CMS and builders update the sitemap by themselves as soon as pages are added or removed.
What is a sitemap index file?
A list of several sitemaps, for example one each for pages, posts and products. WordPress and many plugins work this way. We read the sitemaps it contains as well.
Check a website now
We check "Sitemap" and all other points in a few minutes, free and without sign-up.
Related topics
-
Readable and findable by Google
Do "noindex", the robots.txt or a wrong canonical tag exclude the home page from Google search, and may Google quote it?
-
Broken links
Do the links on the home page lead to working pages?
-
Error page (404)
Does the server correctly answer addresses that do not exist with "404 Not Found"?
-
Page title
Does the home page have a meaningful title that names its topic?