I want to exclude some specific post types from generating sitemaps in yoast seo plugin. Please provide suggestions to do this. Thanks in advance.


If you are using functions.php script to register custom post type, you should declare false to 'has_archive' => true,.

function custom_post_type() {

  $labels = array( ... );
  $args = array(

    // you have to set it to False.
    'has_archive' => false,

  register_post_type( 'post_type', $args );

add_action( 'init', 'custom_post_type', 0 );

This question has been asked a long time ago, but the answer is kind of simple:

  • Go to SEO --> Search Appearance.
  • Select tab Contenttypes.
  • Scroll down, here you can display or hide custom post types and archives from the sitemap.xml file.

Hope that helps for someone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.