• Resolved softext

    (@softext)


    I recently ran into an issue where information in the form of a custom post type that should have only been accessible with a direct link was broadcast across google search results.

    I had assumed with the custom post type setting ‘exclude_from_search’ set to true that Yoast SEO would respect that, apparently not. These posts were still appearing in the sitemap.

    I have since added meta noindex tags to the pages displayed on them and added filters to the ‘wpseo_sitemap_exclude_post_type’ and ‘wpseo_sitemap_exclude_taxonomy’ to exclude the post type and related taxonomies from the index. So the issue is resolved for now but I do think Yoast SEO should check a posts ‘exclude_from_search’ before it starts including posts in the XML.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support amboutwe

    (@amboutwe)

    The Yoast SEO sitemap includes custom post types where 'public' => true,. The exclude_from_search applies to the site’s front end search results; not search engines. As such, the exclude_from_search is not currently used for determining sitemap inclusion.

    As this forum is for support requests, please submit a feature request to our GitHub repository for Yoast SEO. You will need an account to create a new issue for your feature request.

    Please provide as much information about the feature request and don’t forget to include the URL to this conversation in your feature request!

    Plugin Support Jerlyn

    (@jerparx)

    Closed. No further questions.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Suggestion: Sitemap to exclude custom post types with ‘exclude_from_search’.’ is closed to new replies.