XML sitemaps · Sitemap URLs

Not found 4XX URL in sitemap

The XML sitemap lists a URL below this page that does not exist and returns 404 Not Found, which reduces search engines' trust in the sitemap.

How this page is built

/sitemap.xml lists this page and, straight after it, /tests/not-found-4xx-url-in-sitemap/missing/. No page exists at that address, so it returns 404. Nothing on the site links to it, so the sitemap is the only place it appears.

Why it matters

Every URL in a sitemap should return 200. A missing page wastes a crawl and adds an error to the sitemap report in Search Console. When many sitemap URLs fail, search engines trust the sitemap less, and the pages that do exist may be crawled less often.

Missing pages in a sitemap usually mean the sitemap is built from a separate list that is not updated when pages are deleted or moved.

How to check it

Crawl every URL in the sitemap and check the status codes. Crawl tools list sitemap URLs that return 4XX errors, and Search Console’s page indexing report shows them as “Submitted URL not found (404)”.

How to fix it

Remove deleted pages from the sitemap and replace moved ones with their new address. Better still, generate the sitemap from the pages that exist at build time, so it cannot list a page that has gone.

Back to all tests