Get AI SEO for FREE.

Learn More!

How to Exclude Content From Sitemap

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. 

Before we begin, head to WordPress Dashboard → Rank Math SEO and ensure the Sitemap module is enabled. 

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. 

Navigate to Posts or Pages and disable Include in Sitemap

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

Head to 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

Enter the ID into the field and 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. 

Navigate to Categories or Tags and disable Include in Sitemap

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.

Head to General

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. 

Enter the ID of the category, tag, or other custom taxonomy, and click Save Changes

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. 

Head to Attachments and disable Include in Sitemap

3.2 Exclude Specific Attachment

To exclude a specific attachment from the sitemap, navigate to WordPress Dashboard → Media and click on the applicable attachment. 

Head to Media

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. 

Select Exclude this attachment from sitemap

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.

Navigate to Authors

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.

Disable Include in Sitemap

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.

Scroll down to Exclude User Roles

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.

Scroll down to Exclude Users

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. 

Disable the Include KML File in the Sitemap option

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…

Still not using Rank Math?

Setup takes less than 5 minutes including the import from your old SEO Plugin!

Learn more about the PRO Version

Still need help?

?

Submit Your Question

Please give us the details, our support team will get back to you.

Open Ticket

Related Articles