How to Exclude Content from Your XML Sitemap

You may have content on your site that you don't want to submit to search engines.

If that's the case, All in One SEO can help you.

Content is typically submitted to search engines using sitemaps. All in One SEO generates sitemaps that contain your content and it notifies search engines when you've published, changed or deleted content on your site.

Search engines can also find content on their own by either crawling your site and following internal links, or by following links from someone else's site to your content. This is less reliable and takes longer for them to find your content.

You can choose to exclude content from your XML Sitemap so that search engines aren't notified when the content is published, changed, or deleted.

Excluding Content from Your XML Sitemap

To get started, go to Sitemaps in the All in One SEO menu.

Sitemaps menu item in All in One SEO

You should see the General Sitemap screen, scroll down to the Advanced Settings section and click the toggle to display the Advanced Settings.

Advanced Settings in the XML Sitemap settings

Here you’ll see settings for Exclude Posts / Pages and Exclude Terms.

Excluding Posts

In the Exclude Posts / Pages field, start typing the title of any post, page or other post type in this field and a drop down will appear that shows matching content. Click on the content you want to exclude and it will be added in the field.

Typing the title of a page in the Exclude Posts / Pages field

You can then repeat this by typing the title of any content and selecting it.

Excluding Terms

In the Exclude Terms field, type the name of any category, tag or other taxonomy term and a drop down will appear that shows matching content. Click on the content you want to exclude and it will be added in the field.

Exclude Terms setting in General Sitemap Advanced Settings

You may have content on your site that you don't want to submit to search engines.

If that's the case, All in One SEO can help you.

Content is typically submitted to search engines using sitemaps. All in One SEO generates sitemaps that contain your content and it notifies search engines when you've published, changed or deleted content on your site.

Search engines can also find content on their own by either crawling your site and following internal links, or by following links from someone else's site to your content. This is less reliable and takes longer for them to find your content.

You can choose to exclude content from your XML Sitemap so that search engines aren't notified when the content is published, changed or deleted.

Important:

This doesn't stop search engines finding this content on their own. If you want to stop them finding and indexing content then you should read our article on using the noindex meta tag to block search engines from indexing content.

Here's how to exclude content from your XML Sitemap.

Excluding Content from Your XML Sitemap

To get started, go to XML Sitemaps in the All in One SEO menu and scroll down to the Excluded Items section.

You'll see two fields as follows:

Excluded Terms - The Excluded Terms field allows you to exclude any category, tag or custom taxonomy from the XML sitemap. Start typing the name of a category, tag or taxonomy term in the field and a drop down will populate with the matching terms for you to select from.

IMPORTANT: This will also exclude any content belonging to the specified term.  For example, if you exclude the Uncategorized category then all posts in that category will also be excluded from the sitemap.

Excluded Pages - The Excluded Pages field allows you to exclude any page, post or custom post type from the XML sitemap.  To exclude a page, post or custom post type just enter the slug or ID of each item separated by a comma.  For example, “store, cart, checkout” would exclude these three pages from your sitemap.