• Resolved lewatson

    (@lewatson)


    I have 3 categories: A, B and C, and need to exclude category C posts from the xml sitemap. I made the following settings:

    i. Set Search Appearance > Content Types > Posts > Show Posts in search results? = OFF (ie default setting is noindex for all posts)

    ii. For each post in category A and B, set Advanced > Allow search engines to show this Post in search results? = YES

    Verified page source for posts with the default (noindex) and explicit (index) setting. The correct meta tag is being inserted as expected.

    However, the post-sitemap.xml is not being generated for the posts that have been explicitly set to YES (ie index post)

    Do I need to do something else for the post_index.xml to be generated?

    Using:
    Yoast v19.0
    WP v5.8.4 & v6.0

    TIA

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Maybellyne

    (@maybellyne)

    Hello @lewatson,

    Thanks for reaching out regarding noindexing your category.

    First, you should not noindex your posts. In WordPress > Yoast SEO > Search Appearance > Content Types > Posts > Show Posts in search results? = ON. This makes the /post-sitemap.xml to be generated.

    Next, in WordPress > Yoast SEO > Search Appearance > Taxonomies > Show Categories in search results? = ON. This also creates the /category-sitemap.xml/

    Finally, for category C that you want to exclude, edit the category and in the advanced tab of the Yoast SEO plugin, set ‘No’ for the option to ‘Allow search engines to show this Category in search results?’. This excludes all posts assigned to category C from the sitemap.

    Do let us know how it goes.

    Thread Starter lewatson

    (@lewatson)

    @maybellyne “edit the category and in the advanced tab of the Yoast SEO plugin, set ‘No’ for the option to ‘Allow search engines to show this Category in search results?’. This excludes all posts assigned to category C from the sitemap.”

    Setting the Category “Allow search engines to show this Category in search results?” = “No” has been set and does not exclude posts in that category. It only removes the category from category-index.xml

    Plugin Support Maybellyne

    (@maybellyne)

    You are correct! So if you want to noindex the posts, it needs to be done when you edit the post. This should exclude the posts from the /post-sitemap.xml/

    Thread Starter lewatson

    (@lewatson)

    @maybellyne can Yoast’s sitemap be turned off so another xml sitemap can be used and there won’t be two versions?

    Yes, Yoast Sitemap can be disabled under SEO > General > Features (tab). Please note that if you disable Yoast sitemap, the WordPress sitemap under /sitemap.xml will be back.

    I marked this thread as resolved due to a lack of activity by the original poster. The original poster is always welcome to re-open this topic.

    If you are not the original poster but have a similar issue, please read this post before opening a new request.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘XML Post Sitemap Not Generated’ is closed to new replies.