Warningindexing.sitemap-errors

The sitemap lists pages that can't be indexed

Why it matters

Google's instruction for a sitemap is one line: "Include the URLs in your sitemap that you want to see in Google's search results." An address in it that redirects, is missing, is set to noindex, is blocked by robots.txt or names another page as its canonical can't be what you want in search results, so it shouldn't be there. Search Console reports each under Page indexing ("Not found (404)", "Page with redirect", "URL marked 'noindex'", "URL blocked by robots.txt"), and its help says of a 404 that was submitted in a sitemap: "it is worth fixing". It usually means the sitemap is built from a list that has drifted from the site: deleted pages, old addresses from before a redesign.

Sources: Build and submit a sitemap; Page indexing report. "Only indexable pages that answer 200" is what follows from Google's line, not a rule it states, which is why this is a warning.

How to fix it

Regenerate the sitemap from the live site rather than editing it by hand: in most CMSs that means re-saving the SEO plugin's sitemap settings or clearing its cache. Then check that each address below is either fixed (restored, or its noindex removed) or left out of the sitemap. A sitemap should contain only pages that answer 200 at that exact address, are indexable, and are their own canonical.

Examples

These are the rule's own test pages, and what it says about each. They are run on every change to the rule book.

Warning1 address in the sitemap answers with an error: /gone.

Warning1 address in the sitemap redirects somewhere else: /old.

Warning1 address in the sitemap is set to noindex: /thanks.

Warning1 address in the sitemap names a different page as its canonical: /print/about.

Noticehttps://www.example.com/old-map.xml answered 404.

fail-dead-and-noindex
Example site
{
    "sitemap": {
        "errors": [
            "https://www.example.com/old-map.xml answered 404."
        ]
    },
    "pages": [
        {
            "url": "/"
        },
        {
            "url": "/gone",
            "status": 404
        },
        {
            "url": "/old",
            "finalUrl": "/new",
            "redirected": true
        },
        {
            "url": "/thanks",
            "noindex": true
        },
        {
            "url": "/print/about",
            "canonical": "/about"
        }
    ]
}

PassedAll 2 sitemap pages we scanned can be indexed at the address the sitemap gives.

pass-clean
Example site
{
    "pages": [
        {
            "url": "/"
        },
        {
            "url": "/about",
            "canonical": "/about/"
        },
        {
            "url": "/draft",
            "inSitemap": false,
            "noindex": true
        }
    ]
}