Sitemap URL hygiene: keep only clean, canonical URLs in sitemap.xml
Every URL in your sitemap.xml should be the exact, final HTTPS address of the page: no redirect, no query string, no #fragment. A sitemap full of URLs that bounce somewhere else tells Google to crawl addresses you do not want indexed.
Every URL in your sitemap. xml should be the exact, final HTTPS address of the page: no redirect, no query string, no #fragment. A sitemap full of URLs that bounce somewhere else tells Google to crawl addresses you do not want indexed. A sitemap hygiene problem is a sitemap entry that is not a clean crawl target. The check flags a listed URL that uses http:// instead of https://, contains query parameters (?
Last updated·
What it is
A sitemap hygiene problem is a sitemap entry that is not a clean crawl target. The check flags a listed URL that uses http:// instead of https://, contains query parameters (?ref=…) or a #fragment, redirects before it loads, or ends up at a different final URL than the one listed. A trailing slash alone is not flagged.
Why it matters
Google treats the sitemap as your list of canonical URLs. When a listed URL redirects or differs from where the page really lives, the sitemap and the page disagree about which address is canonical, Google spends crawl requests following the hops, and new pages can take longer to index. Clean sitemaps are also re-read more reliably.
How to fix it
- Open the flagged URL and note where it really ends up. The issue evidence lists the problems found plus the final URL, status code and redirect chain. The final URL is usually the one the sitemap should list.
- List the final HTTPS URL in the sitemap. Replace http:// entries with https://, and replace any URL that redirects with the URL it redirects to, so every entry answers 200 OK directly.
- Strip query parameters and fragments. Remove tracking parameters (?utm_source=…, ?ref=…) and #anchors from sitemap entries. If a page genuinely needs a parameter to render, give it a clean path instead.
- Fix the sitemap generator, then resubmit. Most CMS sitemaps are generated, so correct the base URL or plugin setting that produced the bad entries rather than editing the file by hand. Resubmit the sitemap in Search Console and re-scan.
Common false positives
A URL that differs from its final address only by a trailing slash is not flagged. A page that redirects for everyone (for example http:// to https://) is still flagged on purpose: the sitemap should list the destination, not the hop.
Authoritative sources
- Build and submit a sitemap — Google Search Central
- Sitemaps XML format — sitemaps.org
- Google Search Central documentation — Google
- Schema.org vocabulary — schema.org
- SEO Starter Guide — Google Search Central
- MDN — HTML meta and link elements — Mozilla MDN