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…
When you maintain a WordPress site that uses Yoast SEO, the sitemap index shows search engines which XML sitemaps contain your site’s URLs. An XML sitemap is a file that lists pages for search engines to discover. The index points to child sitemaps, which hold those page lists.
You can use the index and child sitemaps to check which content Yoast includes. Open the index links in a browser to find empty or unexpected child sitemaps. Yoast updates its sitemaps as content changes. Settings that control whether a content type appears in search results also determine which URLs appear.
Yoast’s index is typically available at your site’s root as sitemap_index.xml. It contains an entry for each child sitemap, with a location that links to that file. The index’s top-level XML element, called the root element, is <sitemapindex>. Each child entry uses a <sitemap> element and a <loc> element that gives the child sitemap’s URL. When present, a <lastmod> element gives the date the child sitemap was last modified.
A child sitemap lists the URLs. Its top-level XML element, called the root element, is <urlset>. Inside it, each <url> entry has a <loc> element with the page’s URL. Search engines read the index first, then fetch the child files linked from it. Yoast’s sitemap documentation describes the index and its linked sitemaps.
Child sitemap names often reflect the content they contain. For example, a site might have separate files for posts, pages, authors, or categories. The entries depend on which content types, such as posts and pages, and taxonomies, such as categories and tags, are enabled on the site. Check the live index instead of assuming the same file names appear on every site. Yoast also supports adding external sitemaps to the index through its sitemap customization options.
Yoast sorts content that its settings allow into child sitemaps and updates them as content is added or removed. Yoast excludes a post type set to noindex, meaning search engines should not index that type; removing a post type from search results also removes it from the sitemap. The relevant controls appear in Yoast’s Content types, Categories & tags, and Advanced settings.
Yoast limits the number of entries in each sitemap. The default is 1,000, and developers can change the limit with the wpseo_sitemap_entries_per_page filter, as documented in the Yoast sitemap API. When a content group has more URLs than the limit, Yoast splits them across child sitemap files. Check the index to see the file names and how many files there are; do not assume a naming pattern.
An index entry does not guarantee that its child file currently contains URLs. A child sitemap can be empty when its content has been excluded or removed. Open the child file and inspect its <url> entries before treating the index entry as evidence that pages are included.
In WordPress, open Yoast SEO’s sitemap settings and select View the XML sitemap. You can also enter your site’s sitemap index URL directly in the browser, using your own domain followed by /sitemap_index.xml. If the URL does not show Yoast’s index, check that the sitemap feature is enabled. Also check whether another plugin or WordPress itself is providing a different sitemap. Yoast notes that a URL such as /sitemap.xml does not by itself establish that Yoast generated the file.
The browser displays the index as XML. Follow each child URL shown in a <loc> element to view that child’s URL entries. If a page is missing, first check whether its content type appears in the index. Then look for the page’s URL in the matching child sitemap. Also check the content type’s search visibility settings: a noindex setting explains why Yoast leaves that type out.
Yoast adds an X-Robots-Tag: noindex, follow HTTP header to XML sitemap responses. That header applies to the sitemap file; it does not mean the page URLs listed inside the file have been marked noindex. To check for this header, use your browser’s developer tools to inspect the response headers, the information the server sends back, for the sitemap request.
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