Custom Post Type Sitemaps Returning 404 Error

#334929
  • Resolved Jim Ferguson
    Rank Math free

    I have recently created two custom post types and each one has 10-15 entries to it. However, neither post type is being included in sitemap_index.xml, and both of their individual sitemaps are returning a 404 error. I have re-saved permalinks, flushed the cache both on the hosting side as well as in Cloudflare, and confirmed that both post types are set to be indexed + included in sitemaps. Any ideas on why these two still aren’t showing up?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Azib Yaqoob
    Rank Math business

    Hello,

    Thank you for contacting Rank Math today.

    Please head over to Rank Math > Sitemap Settings > Custom Taxonomy > Include in the Sitemap.

    This option controls the inclusion or exclusion of your posts/taxonomies in the Sitemap.

    We hope that answers your question. Please don’t hesitate to contact us again if you need further assistance.

    Thank you

    To be clear, we’re talking about custom post types here – not taxonomies.

    Anas
    Rank Math business

    Hello,

    I logged in to your website and checked the settings.

    I re-saved the sitemap settings(without changing anything) and the sitemap is now updated.
    (Check screenshot in the sensitive data section)

    I will suggest that you add the following filter in the theme’s functions.php file to exclude the sitemaps from caching:

    add_filter( 'rank_math/sitemap/enable_caching', '__return_false');
    

    Here is a guide you can follow to add the filter:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/#functions-php-file

    Hope that helps.

    Looking forward to helping you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

The ticket ‘Custom Post Type Sitemaps Returning 404 Error’ is closed to new replies.