Skip to content

Removing a CPT from the sitemap but leaving the CPT Archive page in the sitemap does not work #11391

@rmarcano

Description

@rmarcano
  • I've read and understood the contribution guidelines.
  • I've searched for any related issues and avoided creating a duplicate issue.

Please give us a description of what happened.

Setting a custom post type not to be indexed will remove it from the sitemap and add a "noindex" to all posts in the CPT.

The Yoast plugin has the option of treating the CPT Archive page separately, by letting you index the archive pages. However, selecting "Yes" in "Show CPT Archive in search results" will not add the CPT Archive to the sitemap, even if the pages do not get a "noindex".

cptarchive

Please describe what you expected to happen and why.

I expected that the CPT Archive page would appear in the sitemap.

How can we reproduce this behavior?

1.Create a Custom Post Type.
2.Go to SEO -> Search Appearance -> Content Types
3.Set the Custom Post Type not to appear in search engines.
4.Set the CPT Archive pages to appear in search engines.
5.Verify that the CPT Archive pages are not in the sitemap.

Technical info

  • WordPress version: 4.9.8

  • Yoast SEO version: 9.0.1

  • Tested with theme: TwentySeventeen

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions