How to exclude content from the sitemap

Posts and pages can be assigned to multiple taxonomies and can unexpectedly show up in your sitemap when you thought they would be hidden. You can exclude individual posts or pages from the sitemap inside the meta box in both Yoast SEO and Yoast SEO Premium, or exclude certain content types by customizing the sitemap index. In this article, we explain how you can exclude content from the sitemap.

To exclude posts from the sitemap, follow the steps below.

  1. Log in to your WordPress website

    When you’re logged in, you will be in your Dashboard.

  2. Edit the post or page

    On the left-hand side, you will see a menu. In that menu, navigate to the post or page (or other custom post type) you’d like to exclude. Scroll down to locate Yoast SEO meta box.

    If you cannot find the Yoast SEO meta box, follow the article Yoast SEO meta box is missing.

  3. Go to Advanced in Yoast SEO meta box

  4. Under Allow search engines to show this Post in search results?, tick No

  5. Publish or update the post or page

Use a filter to bulk exclude posts or pages

You or your developer can also use a filter to bulk exclude posts or pages from the Yoast SEO sitemap. The filter would be placed in your functions.php file. If you’re not sure where that is, please contact your theme developer. As a best practice, we recommend making a backup prior to editing theme files. 

Did this article answer your question?

Thanks for your feedback!

Related articles

Get free SEO tips!