How Yoast SEO Sitemap Settings Affect Archive Pages
In WordPress, an archive page groups related content, such as posts in a category, posts by an author, or posts published on…
When a WordPress site lists an unexpected URL, find the Yoast sitemap file that contains it. A sitemap is an XML file that lists pages or links to other sitemap files. Yoast SEO groups these files in a sitemap index, a directory that links to them, often by content type such as posts or pages.
The sitemap’s location narrows the search. A post URL points toward that post or its content type. A category URL points toward settings for its taxonomy, the grouping that organizes content into categories or tags. Check the relevant Yoast setting. If the dashboard does not explain the entry, look for code or another plugin that adds or changes sitemap content.
In WordPress, go to Yoast SEO → Settings → Site features and check that XML sitemaps are enabled. A typical Yoast sitemap index uses this path:
https://example.com/sitemap_index.xml
Replace example.com with your site’s domain. Yoast documents this dashboard route and the XML sitemap feature.
Each <loc> element in the index gives a sitemap’s address; open the file whose name matches the content you are investigating, such as post-sitemap.xml or category-sitemap.xml. That file is a sub-sitemap, which lists URLs for a particular content type or taxonomy. Inside it, each <url> record describes an entry, and its <loc> contains the page URL.
The optional <lastmod> element gives a modification timestamp, or date and time when the entry was last changed. This can help you judge whether the sitemap output is current, but it does not explain why Yoast included a URL. Yoast’s sitemap specification describes the index and these URL records.
A browser may use an XSL stylesheet, a set of formatting instructions, to control how XML looks on screen. If the page appears blank or malformed, inspect the XML itself before concluding that the sitemap has no entries. Yoast notes that a display or stylesheet problem can occur even when the sitemap source contains data; caching and invalid XML are also among its troubleshooting checks (Yoast’s sitemap troubleshooting advice).
Write down the full unexpected URL and the sub-sitemap where you found it. The file is a diagnostic clue, not proof of the cause.
| Sitemap containing the URL | First place to investigate |
|---|---|
post-sitemap.xml or page-sitemap.xml |
The item’s Advanced setting, its post type’s visibility setting, and any code that filters individual posts |
| A custom post type sitemap | That post type’s search visibility setting and code that excludes the type |
| A category, tag, or custom taxonomy sitemap | The taxonomy’s visibility setting and any term-level exclusion code |
author-sitemap.xml |
Author archive settings and code that excludes authors |
| A video, news, local, or other specialist sitemap | The Yoast add-on or other plugin that provides that sitemap |
| An unfamiliar sitemap location | Code or a plugin that adds a custom or external sitemap |
A URL’s presence does not by itself mean Yoast is malfunctioning. For example, a post assigned to multiple taxonomies can still be included even if you expected one taxonomy relationship to keep it out. Compare the URL with the site’s intended search visibility before changing settings.
For an unexpected post or page, edit the item and open Yoast SEO → Advanced. Check Allow search engines to show this Post in search results? If the item should be excluded from search results, set the option to No and update it. Yoast says a noindex item, meaning a page marked for exclusion from search results, will not appear in its sitemap. This setting changes search visibility as well as sitemap inclusion, so use it only when that matches the page’s intended SEO treatment. See Yoast’s instructions for excluding content.
If several URLs from the same group appear, inspect the matching content type or taxonomy under Yoast SEO → Settings. Yoast’s documented controls include the Content types and Categories & tags areas, though labels and navigation can vary between installations. A content type or taxonomy set to appear in search results is included in the sitemap; turning off that visibility removes it from the sitemap.
For an unexpected author URL, check the author archive settings. For custom post types or taxonomies without a visible dashboard control, check how WordPress registers the type and whether custom code controls its visibility.
If the dashboard setting looks correct, search the active theme, child theme, must-use plugins (plugins that WordPress loads automatically), and custom plugins for Yoast’s sitemap hooks. Hooks are named points where WordPress code can change a plugin’s behavior. Yoast documents hooks that exclude a post type, taxonomy, author, post ID, or term ID, as well as hooks that add a custom sitemap or change a post URL. Its XML sitemap API documentation describes these controls.
Search for identifiers such as wpseo_sitemap_exclude_post_type, wpseo_sitemap_exclude_taxonomy, wpseo_sitemap_exclude_author, wpseo_exclude_from_sitemap_by_post_ids, wpseo_exclude_from_sitemap_by_term_ids, wpseo_sitemap_index, and wpseo_xml_sitemap_post_url. A callback, or function attached to a hook, can affect sitemap output even when the dashboard settings do not explain what you see. A plugin can also add a specialist or external sitemap, so check enabled integrations when an unfamiliar sitemap appears.
The requested path alone does not identify which software generated the sitemap. Yoast’s specification says /sitemap.xml should redirect to /sitemap_index.xml, while its help documentation notes that a sitemap served at /sitemap.xml can come from WordPress core or another plugin. Open the URL, follow any redirect, and inspect the final response and its contents before tracing the entry to Yoast.
After you change a setting or code, reload the sitemap index and the affected sub-sitemap. If the URL remains, clear the relevant plugin, hosting, server, or CDN cache and check again. Yoast identifies caching as one reason sitemap output can remain unchanged and documents disabling and re-enabling the sitemap feature as a cache-reset option.
Also separate the sitemap file’s own indexing instructions from the page entries it contains. Yoast’s sitemap response uses an X-Robots-Tag: noindex, follow header so search engines do not index the XML file itself. That header does not determine whether a particular page belongs in the sitemap.
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