By excluding irrelevant or low-quality content from your sitemap, you can have more control over what is indexed by search engines, ensuring that only the most relevant and valuable content appears in search results.
In this knowledgebase article, we will show you how to exclude posts, pages, categories, tags, users, attachments, author archives, and location KML data from your sitemap.
Table Of Contents
Before we begin, head to WordPress Dashboard → Rank Math SEO and ensure the Sitemap module is enabled.
1 Excluding Posts and Pages From the Sitemap
1.1 Exclude All Posts and Pages
To exclude all posts or pages from the sitemap, navigate to WordPress Dashboard → Rank Math SEO → Sitemap Settings → Posts or Pages and disable Include in Sitemap, as shown below.
Once done, scroll down and click Save Changes.
1.2 Exclude Specific Posts and Pages
To exclude specific posts or pages from the sitemap, head to WordPress Dashboard → Rank Math SEO → Sitemap Settings → General.
Once done, scroll down to Exclude Posts and enter the ID of the post, page, or other custom post type into the field. Remember to separate multiple IDs with a comma. Once done, scroll down and click Save Changes.
2 Excluding Categories and Tags From the Sitemap
2.1 Exclude All Categories and Tags
To exclude all categories and tags from the sitemap, navigate to WordPress Dashboard → Rank Math SEO → Sitemap Settings → Categories or Tags and disable Include in Sitemap.
Once done, scroll down and click Save Changes at the bottom of the screen.
2.2 Exclude Specific Categories and Tags
To exclude specific categories and tags from the sitemap, navigate to WordPress Dashboard → Rank Math SEO → Sitemap Settings → General, as shown below.
Once done, scroll down to Exclude Terms and enter the ID of the category, tag, or other custom taxonomy into the field. Ensure you separate multiple IDs with a comma.
Next, scroll down and click Save Changes at the bottom of the screen.
3 Excluding Attachments From the Sitemap
3.1 Exclude All Attachments
To exclude all attachments from the sitemap, head to Rank Math SEO → Sitemap Settings → Attachments and disable Include in Sitemap, as shown below. Once done, scroll down and click Save Changes.
3.2 Exclude Specific Attachment
To exclude a specific attachment from the sitemap, navigate to WordPress Dashboard → Media and click on the applicable attachment.
Next, scroll down the options available on the right side of the screen and check the Exclude this attachment from sitemap option, as shown below.
4 Excluding Users and Author Archives From the Sitemap
To exclude a user, user role, or author archives from the sitemap, navigate to WordPress Dashboard → Rank Math SEO → Sitemap Settings → Authors, as shown below.
Once done, navigate to the relevant section below.
4.1 Exclude Author Archives
To exclude your author archives from the sitemap, navigate to the Include in Sitemap option and disable it, as shown below. Once done, scroll down and click Save Changes.
4.2 Exclude User Roles
Here, scroll down to the Exclude User Roles field and select the user roles to exclude from the sitemap, as shown below. Next, scroll down and click Save Changes.
4.3 Exclude Specific Users
To exclude specific users from the sitemap, scroll to Exclude Users and enter their ID into the field. Ensure you separate multiple IDs with a comma. Once done, scroll down and click Save Changes.
5 Excluding Location KML Data From the Sitemap
Here, navigate to WordPress Dashboard → Rank Math SEO → Sitemap Settings → Local Sitemap and disable the Include KML File in the Sitemap option, as shown below. Once done, scroll down and click Save Changes.
Note: If the Local Sitemap option is unavailable, head to WordPress Dashboard → Rank Math SEO and enable the Local SEO module.
By following the above steps, you can effectively exclude content from your sitemap, improving the overall quality and relevance of the indexed pages on your website. This practice can lead to better crawling and indexing by search engines, ultimately boosting your SEO efforts.
If you have any questions about excluding content from your sitemap, you’re more than welcome to contact our dedicated support team. We’re available 24/7, 365 days a year…