When managing your website’s SEO using Yoast SEO, you may encounter a situation where certain posts or pages appear in your sitemap unexpectedly. This often happens because posts and pages can be assigned to multiple taxonomies, causing them to show up even when you thought they would be hidden. Luckily, Yoast SEO provides an easy way to manage what content appears in your sitemap and index, allowing you to exclude posts or pages to better control your site’s visibility.
In this article, we will explore how to exclude specific posts and pages from sitemaps in Yoast SEO and Yoast SEO Premium, as well as how to customize your sitemap index for better taxonomy management.
Why Exclude Posts and Pages from Your Sitemap?
Sometimes, you don’t want all content to be indexed or appear in your sitemap. For instance, WordPress do not include link in sitemap or index might be your goal for certain pages that don’t need to rank or be indexed by search engines. This could be applicable to private pages, thank-you pages, or other non-essential content that doesn’t need search visibility.Exclude Individual Posts and Pages in Yoast SEO
Yoast SEO provides a straightforward way to exclude individual posts and pages from your sitemap:- Edit the Post/Page: Go to the post or page that you want to exclude from the sitemap.
- Open Yoast SEO Metabox: Scroll down to the Yoast SEO metabox within the post editor.
- Set to No Index: Under the Advanced tab, set the “Allow search engines to show this Post in search results” option to “No.”
- Exclude from Sitemap: This will ensure that the post or page is excluded from the sitemap and won’t be indexed by search engines.
Exclude Certain Content Types from the Sitemap
In addition to individual posts and pages, you might want to exclude certain content types or taxonomies from your sitemap. Yoast SEO makes this easy to manage by allowing you to customize the sitemap index:- Go to Yoast SEO Settings: Navigate to SEO > Search Appearance in your WordPress dashboard.
- Select Content Types: You will see options to control the visibility of posts, pages, and media. Toggle these settings to control what appears in the sitemap.
- Adjust Taxonomy Settings: You can also exclude specific taxonomies (categories, tags, etc.) by navigating to the Taxonomies tab and choosing whether they should be included in the sitemap or not.