Currently Available: Need a skilled Software Developer for your next project?
Categories
WordPress

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 attachment pages appear in those sitemaps. An attachment page is a WordPress page associated with an uploaded file. These settings do not necessarily create a separate list of every image file.

Check Yoast’s sitemap and media settings, then open the sitemap URLs your site serves. On sites with many images, an attachment sitemap can list attachment-page URLs instead of direct image URLs. Settings that keep content out of search results can also affect what Yoast includes.

Check Yoast’s sitemap and media settings

In the WordPress dashboard, open Yoast SEO → Settings → Site features. Under Technical SEO, confirm that XML sitemaps is on, then select View the XML sitemap. Yoast documents this setting and entry point in its XML sitemap instructions.

Next, look for Yoast’s media settings. In some versions, the path is Search Appearance → Media. Check Show Media in search results? and Redirect attachment URLs to the attachment itself? The exact menu location or wording can vary by Yoast version, so use the settings available in your installation.

These settings control whether media pages appear in search results and how their URLs behave. Yoast’s documentation says content types set to noindex are excluded from sitemaps; noindex is an instruction that tells search engines not to index a URL. If Yoast excludes media pages from search results, check whether that explains why an attachment entry is missing before treating the sitemap as broken. The redirect option is separate. Check what happens when you open an attachment URL; the option does not necessarily create a sitemap of direct image URLs.

Open the sitemap URLs your site serves

The sitemap index is the file that points to the individual sitemaps Yoast generates. Start at:

https://your-domain.example/sitemap_index.xml

Replace the example host with your site’s domain. Open the URL in a browser and look for sitemap entries related to attachments. A Yoast issue refers to an attachment sitemap at /attachment-sitemap.xml, but the URL and whether that sitemap appears depend on the site’s configuration and plugin behavior. Treat the sitemap index as the source of truth for your site’s current URLs, and follow the attachment entry shown there if one exists.

When you open an attachment sitemap, inspect its <loc> entries. Each entry contains a URL. Check whether the URL points to an attachment page or a media file, then compare a listed attachment URL with what you saw in the media settings. A third-party image and video sitemap plugin description describes Yoast’s attachment-page listings separately from direct links to image or video files. Because that description is not Yoast documentation, verify the actual entries on your site.

Yoast adds an X-Robots-Tag: noindex, follow HTTP header to XML sitemap responses. That header is expected and does not mean the sitemap is unavailable. Yoast’s sitemap documentation explains this behavior. Check that the sitemap URL loads and displays XML, then read its entries; do not judge it by whether the sitemap itself appears in search results.

What to expect on image-heavy sites

A large image library does not guarantee that every image gets a separate entry in an attachment sitemap. Check the sitemap index and its child files, then compare their entries with the URLs you expect Yoast to list. If your goal is to find images used on posts or pages, also inspect the relevant post or page sitemap; an attachment sitemap and a page sitemap serve different URL types.

Yoast documents a filter, wpseo_sitemap_entries_per_page, that developers can use to change the number of entries in each sitemap. The Altis documentation describes additional limits for its own platform, but those limits do not apply to every standard Yoast installation. For your site, use the child sitemaps linked from the index rather than assuming one file must contain every entry.

A 2018 Yoast issue reported that, in one older Yoast and WordPress setup, the attachment sitemap left out images added after the plugin was activated. That report does not establish current behavior. If expected attachments are missing, confirm the media settings, check whether the URLs appear in any sitemap linked from the index, and test the affected attachment URLs directly. If the issue persists, record your Yoast version and the exact missing URLs before troubleshooting further.

What I'm building

Delegate tasks. Get software.

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

Email updates

Usually a new article and a few links I found interesting.

No spam. Unsubscribe with one click.

Leave a Reply

Your email address will not be published. Required fields are marked *