Location Pages Not Showing in Sitemap

#1116257
  • Hello,

    We recently created a new custom post type – locations – and they appear in the RankMath sitemap settings. I have enabled them, however, this sitemap link leads to a 404, and the sitemap isn’t present in the sitemap index, either.

    How can I get this post type and these pages added?

    Thanks for any insight.

    Best,
    Wells Westmoreland

Viewing 1 replies (of 1 total)
  • Hello,

    We apologize for the issue you are facing with your custom post type not appearing in the sitemap. Here are a few steps you can take to troubleshoot and resolve this issue:

    1. Check Sitemap Settings: Ensure that the new custom post type is set to be included in the sitemap. You can do this by navigating to Rank Math SEO → Sitemap Settings and confirming that the option to include your custom post type is enabled.

    2. Index Settings: Make sure that the custom post type is set to be indexed. If it’s set to noindex, it will not appear in the sitemap. You can check this by going to the post editing screen and looking under the Rank Math SEO → Advanced tab to ensure the Robots Meta is set to index.
      set to noindex

    3. Caching Issues: Sometimes, caching can cause issues with sitemaps. If your sitemap is cached, it may not reflect recent changes. You can exclude the sitemap from caching by adding the following code to your theme’s rank-math.php file:

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

      After adding this code, save the changes and check your sitemap again.

    4. Permalink Structure: Ensure that your permalink structure is set correctly. Sometimes, resetting permalinks can help resolve 404 errors. You can do this by going to Settings → Permalinks and simply clicking Save Changes without making any modifications.

    5. Flush Rewrite Rules: If you have added a new custom post type, you may need to flush the rewrite rules. This can be done by visiting the Settings → Permalinks page and clicking Save Changes.

    If you have followed these steps and are still experiencing issues, please reply to this ticket with your site URL so we can assist you further. A human agent from our support team will take over and provide more specific guidance.

    Thank you for raising this concern, and we hope this helps you resolve the issue!

    Sources:
    We Detected New Post Type(s) » Rank Math
    Why the Sitemap_Index.xml is Throwing a 404 Error » Rank Math

    This is an automated reply from Rank Math Support Bot. If you need further assistance, please reply to this topic and a human support agent will reply to you shortly.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this ticket.