Site Map(XML Sitemap) is a very important tool in SEO optimization that helps search engines crawl website content faster.WordPressUsers commonly use Yoast SEO plugin to automatically generate sitemaps for easy management.
Some page types (e.g., media pages, tabs, categorized directories, etc.) are not suitable for inclusion and can easily affect weight distribution or cause duplicate content.
This tutorial will explain how to use the Yoast SEO plugin to exclude these page types and optimize the sitemap structure to allow search engines to focus more on your site's key content.
![Image[1]-Yoast SEO Tutorial: How to Exclude Page Types from WordPress Sitemaps](https://www.361sale.com/wp-content/uploads/2025/07/20250719092444542-image.png)
I. Why exclude specific page types?
In the default setting, theYoast SEOwill add almost all content types to the XML sitemap, including:
- Posts
- Pages
- Media
- Custom Post Types (Custom Post Types)
- Taxonomies (e.g., categorized directories, tags, author archive pages)
While this ensures that search engines crawl as much of the site's content as possible, it also poses several problems:
- Pages with no real value are indexed, such as automatically generated attachment pages
- Duplicate content risks, such as tabs that are highly overlapping with categorized directories
- Crawl quotas are wasted, affecting the frequency of crawling the main content page
- Weight dilution, which is detrimental to the ranking of core pages in search engines
Excluding some page types wisely can help focus search engine resources and improve SEO results.
Second, how to exclude page types in Yoast SEO?
Yoast SEO provides a clear options interface to quickly disable content types that do not need to appear in the sitemap.
1. Exclusion of article types (Post Types)
The procedure is as follows:
- log inWordPressthe area behind a theatrical stage
- Go to Yoast SEO > Settings
![Image[2]-Yoast SEO Tutorial: How to Exclude Page Types from WordPress Sitemaps](https://www.361sale.com/wp-content/uploads/2025/07/20250719092805750-image.png)
- Click on "Content Type" in the top tab.
- Find the type of content you want to exclude, e.g. "Categories", "Products", etc.
- Set "Show in search results?" to "No". to "No"
![Image[3]-Yoast SEO Tutorial: How to Exclude Page Types from WordPress Sitemaps](https://www.361sale.com/wp-content/uploads/2025/07/20250719093100417-image.png)
- Save Changes
This not only prevents the type from appearing in the sitemap, but also sets it to noindex, preventing it from being indexed by search engines.
2. Exclusion of classifications (Taxonomies)
If you don't want categories, tags or custom taxonomies to appear in the sitemap, do the following:
- leave for Yoast SEO > Search Appearance > Taxonomy
- Find the items you want to exclude, such as "labels" or "product categories".
- Set "Show in search results?" to "No". Set to "No"
![Image[4]-Yoast SEO Tutorial: How to Exclude Page Types from WordPress Sitemaps](https://www.361sale.com/wp-content/uploads/2025/07/20250719093230226-image.png)
- Save Changes
3. Exclusion of author pages or date archive pages
- Go to Yoast SEO > Settings > Advanced
These pages are not important for most websites and can be uniformly disabled:
- Disable the "Author profile page" enable switch
![Image[5]-Yoast SEO Tutorial: How to Exclude Page Types from WordPress Sitemaps](https://www.361sale.com/wp-content/uploads/2025/07/20250719094127537-image.png)
- Also close the "Date Archive Page".
![Image [6]-Yoast SEO Tutorial: How to Exclude Page Types from WordPress Sitemaps](https://www.361sale.com/wp-content/uploads/2025/07/20250719094317857-image.png)
- Save Changes
This effectively avoids duplicate content and improves the overall indexing quality.
III. How can I confirm that the changes have taken effect?
After completing the above setup, you can check theSite MapWhether unwanted content types have been successfully excluded:
Method 1: Directly view the sitemap link
Open the main site map link for your website:
https://你的域名/sitemap_index.xml
You'll see sitemap sub-index files for different content types, for example:
- post-sitemap.xml
- page-sitemap.xml
- category-sitemap.xml
If you successfully exclude "media", you will no longer see attachment-sitemap.xml.
Method 2: InGoogle Search Consolevalidate (a theory)
- Sign in to Google Search Console
![Image [7]-Yoast SEO Tutorial: How to Exclude Page Types from WordPress Sitemaps](https://www.361sale.com/wp-content/uploads/2025/07/20250719094732278-image.png)
- Submit Site Map Link
![Image [8]-Yoast SEO Tutorial: How to Exclude Page Types from WordPress Sitemaps](https://www.361sale.com/wp-content/uploads/2025/07/20250719094847333-image.png)
- View system crawl results and page count
![Image [9]-Yoast SEO Tutorial: How to Exclude Page Types from WordPress Sitemaps](https://www.361sale.com/wp-content/uploads/2025/07/20250719094945473-image.png)
- Check if you have successfully excluded page types that do not need to be indexed
IV. Notes and recommendations
- Use the "no" setting with caution. Once enabled, Yoast will simultaneously remove this type of content from the sitemap and set it to noindex to not be included.
- It is recommended to recheck the settings after each new content type or taxonomy is added to avoid being added to the sitemap by default.
- Avoid misconfigurations that prevent the sitemap_index.xml page from being generated. For example, if you set all content types to not display, the sitemap will be empty.
V. Summary
Yoast SEOThe plugin's sitemap functionality is powerful enough that a simple setup can exclude unnecessary page types, allowing search engines to focus more on the core content you wish to rank.
Properly optimized sitemaps can improve the overall crawling efficiency of your website, control the quality of your inclusions, and avoid the risks associated with duplicate content. If you are focusing on improving your website's SEO performance, this step should not be overlooked.
Link to this article:https://www.361sale.com/en/68516The article is copyrighted and must be reproduced with attribution.






















![Emoji[wozuimei]-Photonflux.com | Professional WordPress repair service, worldwide, rapid response](https://www.361sale.com/wp-content/themes/zibll/img/smilies/wozuimei.gif)
![Emoticon[baoquan] - Photon Wave Network | Professional WordPress Repair Services, Worldwide Coverage, Rapid Response](https://www.361sale.com/wp-content/themes/zibll/img/smilies/baoquan.gif)

No comments