Knowledge hub
Sitemap cleanup for deindexing
A sitemap lists the URLs you want search engines to know about. If it lists pages you are trying to remove, you are sending two opposite messages at once. Cleaning it is a small step with an outsized effect on how consistent your signals look.
Key takeaways
- Sitemaps are hints; removing a URL from one does not deindex it.
- List only canonical, indexable URLs returning 200.
- A temporary sitemap of changed URLs is a technique, not a guarantee.
- Check what your CMS regenerates after a cleanup.
What a sitemap is, and is not
A sitemap is a file that lists URLs and, optionally, when they last changed. Google's sitemap documentation describes it as a way to tell search engines about pages and files you consider important. It helps discovery. It does not remove anything, and removing a URL from a sitemap does not deindex it. Google's guidance on duplicates also lists sitemap inclusion as a weak signal about which URL should be canonical.
So think of the sitemap as a statement of intent. Everything in it should be a URL you want indexed, canonical, and returning a 200 status. Everything else is noise.
What to take out
- URLs that return 404 or 410. They are gone. Listing them contradicts the status code.
- URLs that redirect. Sitemaps should list final destinations.
- URLs with
noindex. Listing a page you have told engines not to index is contradictory. - Non-canonical duplicates. List the canonical version only. See canonical tags are hints, not removal.
- Parameter and filter URLs you do not want indexed.
- Staging or old-host URLs that were generated with the wrong base address.
- Injected entries after a compromise, including sitemap files you did not create. See hacked-site spam URL cleanup.
The temporary-sitemap technique
There is a practical exception. After you have set 410 or noindex on a batch of URLs, some practitioners submit a separate, temporary sitemap that lists exactly those URLs with a recent modification date, so that crawlers are encouraged to revisit them and see the new signal sooner. Once the URLs have dropped out, the temporary sitemap is removed. This is a technique, not a guaranteed accelerator. Search engines treat sitemaps as hints, and we make no promise about its effect. If you use it, keep it separate from your main sitemap, so that the main file stays clean.
lastmod honesty
Accurate modification dates help engines decide when to recrawl. Setting every URL to today's date on every build, without real changes, teaches engines to distrust the field. Use the date of a real content change. For a removal project, update the date for URLs where a signal changed.
Reporting in Search Console
Submitting a sitemap in Search Console gives you per-sitemap reporting. Splitting sitemaps by section makes it easier to see which part of a site has indexing problems. The Page indexing report can be filtered by sitemap, which is useful for tracking a cleanup: you can compare the number of URLs submitted with the number indexed. Keep sitemaps within the size limits in Google's documentation.
robots.txt reference
A robots.txt file can include a Sitemap line that points crawlers to your sitemap location. Make sure it points to the current file, and not an old one from a previous platform. This site's own file does so.
Sitemaps and removed hosts
When you retire a host, remove its sitemaps, or have it return 410 for them, and delete the references in robots.txt. If a retired host's sitemap keeps being fetched, engines continue to look for the URLs in it. For migrations, the old sitemap is sometimes kept for a while to help crawlers find the redirects, then retired. That decision belongs in the plan, which is why we cover it in post-migration cleanup.
CMS and plugin behaviour
Many CMS platforms generate sitemaps automatically, and plugins sometimes include noindexed pages, tag archives, attachment pages or other low-value URLs by default. Check the generator's settings, since editing a file by hand is pointless if it is regenerated. After a deindexing project, confirm that the generator's rules exclude what you removed.
Verifying
- Fetch the sitemap and run through every URL, checking status, redirect and robots directive. A short script or a crawler tool does this quickly.
- Confirm that every URL in the sitemap is indexable and canonical.
- Resubmit in Search Console and Bing Webmaster Tools.
- Re-check after the next deployment.
What we do
In every engagement, sitemap review is part of the audit and the verification, as described on how it works. If you would like us to do this for a site, request a quote.
Related reading
- How it worksOur six-stage process from intake to report.
- Hacked-site spam URL cleanupClear injected spam pages out of search results after a compromise.
- Post-migration cleanupRemove old domains, URL structures and leftovers after a site move.
- Canonical tags are hints, not removalWhat rel=canonical does and why it cannot remove a page.