Verifying Yoast Sitemaps After Theme or Plugin Updates
After a WordPress theme or related plugin update, maintainers should check whether Yoast SEO still publishes the intended sitemap index and whether…
On a WordPress site, Yoast controls which URLs appear in its XML sitemap and whether pages should appear in search results. An XML sitemap is a file that lists URLs for search engines to find. A noindex directive tells a search engine not to include a page in search results.
Yoast’s documented search-visibility settings remove excluded content from the sitemap and mark it noindex. A sitemap-only exclusion, such as a developer filter, changes which URLs Yoast lists. The filter documentation does not say that it adds a noindex directive. This distinction helps you choose the right setting and understand what search engines receive.
A sitemap gives search engines URLs to consider fetching, or crawling. Google treats a submitted sitemap as a hint, not a guarantee that it will crawl or index every listed URL, according to its sitemap guidance.
A noindex directive is an instruction to keep a page or resource out of search results. A site can send it in a page’s robots meta tag or in an HTTP response header, which is metadata returned with the page. Google must be able to crawl the URL and read the directive before it can apply it, as described in Google’s noindex documentation.
A sitemap tells search engines which URLs to consider. A noindex directive tells them which pages to leave out of search results. A URL missing from a sitemap is not, for that reason alone, marked noindex, and a URL listed in a sitemap is not guaranteed to appear in search results. Search engines may also find URLs through links or other sources.
Yoast’s documented content-type setting controls whether a type of content appears in search results. Turn the setting off to exclude that content from search results and remove it from Yoast’s sitemap. Yoast explains the setting and its effect on sitemap inclusion in its sitemap customization instructions.
For one post, page, product, or other supported item, use its Yoast Advanced settings and set the option for showing it in search results to No. Yoast documents this as noindexing the item, and says noindexed content is omitted from the sitemap. The individual noindex instructions cover that setting. Labels and navigation can depend on the Yoast version, so check the settings in the version installed on your site.
Yoast also documents developer filters for excluding a post type or a taxonomy, a way to group content, from its sitemap. These filters include wpseo_sitemap_exclude_post_type and wpseo_sitemap_exclude_taxonomy. They change which URLs the sitemap lists. Their documentation does not say that they add noindex, so do not use sitemap exclusion alone to keep content out of search results.
| Intended outcome | Yoast control | Effect |
|---|---|---|
| Keep a content type out of search results | Turn off its search-results visibility setting | Yoast documents this as noindexing the type and removing it from the sitemap. |
| Keep one item out of search results | Set its Advanced search-results option to No | Yoast documents the item as noindexed and omits it from the sitemap. |
| Omit a type or taxonomy from the sitemap while leaving search visibility eligible | Use a sitemap exclusion filter | Changes sitemap membership; the filter documentation does not say it applies noindex. |
After changing a filter or setting, inspect the actual sitemap and the affected page’s rendered HTML or HTTP response. A different sitemap generator, custom code, or another plugin can affect what the site serves.
A URL’s absence from a Yoast sitemap does not prove that it has a noindex directive. Yoast lists several reasons a page might be missing: the page or its content type has a noindex directive, its canonical URL points elsewhere, or Yoast SEO Premium redirects it. A canonical URL identifies the preferred URL for a page. Yoast’s sitemap troubleshooting guidance describes these cases.
Also distinguish a page’s noindex directive from the noindex, follow header Yoast places on its XML sitemap response. That header tells search engines they do not need to index the sitemap file itself; Yoast says it does not prevent them from reading or parsing the sitemap. It does not apply noindex to the pages listed inside the file, as Yoast explains in its XML sitemap documentation.
The robots.txt file controls whether a search engine crawler can fetch a URL. A noindex directive tells a crawler that has fetched the page not to index it. If robots.txt blocks a page, Google may not be able to read its noindex directive. Google therefore advises allowing crawling when you want Google to process a page-level noindex instruction.
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