How to Verify Yoast SEO Media Sitemap Settings
On a WordPress site, Yoast SEO generates XML sitemaps, files that list URLs for search engines to discover. Media settings determine whether…
On a WordPress site, categories and tags group posts into archive pages. Yoast SEO lists eligible archive types in its XML sitemap index, a file that points search engines to separate sitemaps.
To remove category or tag archives, change the setting for that category or tag type, called a taxonomy, in Yoast SEO’s Categories & tags settings. The change applies to every archive in that category or tag type. To exclude one page, use a page-specific setting or method.
In WordPress, open Yoast SEO → Settings → Categories & tags and select the category or tag settings. Disable the setting that makes that taxonomy’s archive pages appear in search results. Yoast’s instructions for customizing the sitemap index describe these controls for categories, tags, and other taxonomies.
The setting’s exact wording can vary by Yoast version. Look for the search-result visibility control for the taxonomy you want to remove. This control also determines whether those archive pages appear in search results, so changing it affects more than their sitemap links.
Some taxonomies do not appear in these settings because WordPress has not registered them as public. If the taxonomy is missing, Yoast’s settings cannot control it there. A developer can use Yoast’s wpseo_sitemap_exclude_taxonomy filter to exclude a taxonomy from the sitemap; the same filter is documented in Yoast’s sitemap customization guidance.
After saving the setting, open your site’s sitemap index, commonly at /sitemap_index.xml. The index links to the site’s individual sitemaps. Check that the sitemap for the excluded taxonomy, such as the category or tag sitemap, no longer appears.
If the link remains, first confirm that you changed the setting for the intended taxonomy and saved it. Also check whether the taxonomy is public and whether a developer filter or other configuration affects sitemap output. Yoast has documented an issue involving empty taxonomies that still appeared in a sitemap, so an empty taxonomy’s presence does not by itself show that the setting was ignored. See the Yoast report on empty taxonomies.
The taxonomy setting applies to an archive type, such as all category archives. It does not target one post or page. For a single page, use a page-specific exclusion method, such as the wpseo_exclude_from_sitemap_by_post_ids filter; community examples discuss this post-ID approach.
A single category or tag term is also different from an entire taxonomy. Yoast provides the wpseo_exclude_from_sitemap_by_term_ids filter for excluding specific terms. Use the taxonomy-level control when you want to remove all archives of that type, and a term- or post-specific method when you want a narrower exclusion.
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