Documenting Yoast SEO Sitemap Settings for Client Handoffs
When handing off a WordPress site, record both whether Yoast SEO generates XML sitemaps and which kinds of content Yoast includes in…
When a removed WordPress page still appears in a Yoast SEO sitemap, first check the sitemap XML that the site is currently serving. Yoast updates its sitemaps automatically when content changes, so a manual rebuild is normally unnecessary. If the XML still lists the URL, check the WordPress item’s status, Yoast settings or customizations, and caches. If the live sitemap no longer contains the URL but Google still shows it, the issue is crawling or indexing rather than sitemap generation.
A sitemap index is an XML file that lists a site’s separate sitemap files. Check the index, then inspect the relevant child sitemap for the exact URL. This tells you whether the problem is in the index or in one content sitemap.
Open your site’s Yoast sitemap index, typically at:
https://example.com/sitemap_index.xml
Check that you opened the right site, including whether its address uses HTTP or HTTPS and the correct hostname (the site’s domain name). For example, an HTTPS sitemap and an HTTP sitemap may return different responses. In the index, find the child sitemap for the relevant content type, such as pages, posts, or a custom post type. Open that file and search for the exact removed URL.
Check whether the index lists the expected child file and whether that file includes the URL. Check whether Yoast generated the relevant child sitemap. Yoast allows other sitemaps to be added to its index, so an entry in the index does not prove Yoast generated that file. Its sitemap index documentation describes how the index combines individual sitemaps.
If the URL does not appear in the current XML response, Yoast is no longer publishing it in that sitemap. A Google result or Search Console report that still shows the URL is a separate issue.
First confirm what happened to the WordPress item. A post or page sent to Trash remains in WordPress’s trash state. Its status depends on whether Trash is enabled and how you deleted it. Check the item in the dashboard before changing sitemap settings. WordPress documents the behavior of its wp_delete_post() function.
For a post or page that still exists but should not appear in search results or the sitemap, open it in the editor, expand the Yoast SEO sidebar, and go to Advanced. Set Allow search engines to show this Post in search results? to No, then publish or update the item. Yoast says this setting excludes that post or page from the sitemap. It is intended for live content, so it is not the usual fix for an item that has genuinely been deleted. See Yoast’s exclusion instructions.
To exclude every item in a content type or taxonomy, such as categories or tags, review Yoast SEO → Settings and the relevant Content types, Categories & tags, or Advanced settings. Turning off Show [type] in search results? also removes that type from the sitemap. Use this setting only when the exclusion should apply to every item of that type, rather than one URL.
If the item’s status and Yoast settings do not explain why the URL appears, check theme and plugin customizations or other sitemap integrations. Yoast provides developer filters for sitemap inclusion, including filters that exclude individual post IDs or whole post types.
Yoast identifies WordPress plugins and server-level caching as reasons an old sitemap response can persist. Clear the cache in your WordPress caching plugin or hosting service, or purge the reverse proxy or content delivery network (CDN). Then request the index and child sitemap again. If your hosting or caching provider shows response headers, check them for signs that a cache served the response. Cache controls vary by provider, so use that provider’s instructions to purge or exclude sitemap URLs.
Yoast says its own sitemap cache has been disabled by default since Yoast SEO version 9.0. That does not rule out a separate cache in WordPress, hosting, a proxy, or a CDN. Yoast’s sitemap troubleshooting steps recommend checking those layers before treating an old response as a Yoast setting problem. Disabling and re-enabling the sitemap feature after clearing caches is a fallback, not the normal first step.
Use the result of a fresh request to narrow the cause:
| What the current XML shows | What to check next |
|---|---|
| The URL remains after you have cleared or bypassed relevant caches. | Confirm the item’s WordPress status and content type, then inspect Yoast settings, custom filters, and other sitemap integrations. |
| The URL disappears after a cache purge. | The cache was serving an older sitemap response. Check which layer returned it and whether sitemap URLs need a cache exclusion. |
| The index and child sitemap omit the URL, but Google still reports or displays it. | The live sitemap is clean. Allow for Google’s separate crawling and indexing work. |
Yoast’s sitemap index is the one it recommends submitting in Search Console. Submitting the current index helps Google find the sitemap files, but it does not force an immediate recrawl or search-result change. Google describes sitemaps as hints. It says checking and indexing updates can take three days or more for most sites. This is general guidance, not a guaranteed timeline for deleted URLs. See Google’s crawling guidance.
Removing a URL from a sitemap does not determine what happens when someone or a search crawler requests that URL. If the deleted content has no suitable replacement, set the old URL to return HTTP 404 (not found) or 410 (gone). If a relevant replacement exists, redirect the old URL to it with a 301 redirect. Google treats sitemap cleanup and URL removal as separate parts of crawling and indexing.
Give Vroni a GitHub issue, bug report, spec, or rough idea. It reads the repo, plans the change, writes code, runs checks, and works toward a review-ready pull request.
Take a look at vroni.com