Why a page is missing from the Yoast sitemap (and the easy thing everyone misses)
Sometimes a page is published, accessible, and even visible in the WordPress core sitemap, yet it never appears in the Yoast XML sitemap.
This is rarely a bug. In most cases, it is a canonical URL mismatch that Yoast is correctly enforcing.
If the page loads normally in a browser, this issue is almost always configuration related rather than a visibility problem.
Why this is easy to miss
Browsers and WordPress often treat URLs with and without trailing slashes as equivalent. Humans do too.
Yoast does not. It requires an exact match, character for character, including trailing slashes and protocol.
WordPress sitemap vs Yoast sitemap
WordPress core sitemaps list all published content without enforcing canonical intent.
Yoast sitemaps only list URLs that are canonical and indexable. This is intentional and protects against duplicate content.
The most common cause
The most common cause is a manually set canonical URL that does not exactly match the page URL.
This often happens with trailing slashes or copied URLs.
How to check and fix it
Follow these steps:
Confirm the page is published and not private
View the page source and locate the canonical link tag
Compare it character by character with the page URL
Remove any manually set canonical unless handling genuine duplicates
Let Yoast generate a self canonical URL automatically
Clear the Yoast sitemap cache
Preventing this in future
Avoid manually setting canonical URLs unless you are handling genuine duplicates.
Consistency in URL structure is key to reliable sitemap inclusion.
If you manage a WordPress site and something does not behave as expected, this is usually a configuration issue rather than a fault.
