New posts not in sitemap

#872227
Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,

    We apologize for the issue you are facing with your sitemap not updating correctly. Here are a few steps you can take to troubleshoot and ensure that your new posts are included in the sitemap:

    1. Check Post Status: Ensure that the new posts are published and not in draft or pending review status. Only published posts will appear in the sitemap.

    2. Sitemap Settings: Verify that the news sitemap feature is enabled for the post types you want to include. You can check this in the Rank Math settings under Rank Math SEO → Sitemap Settings.

    3. Indexing Settings: Make sure that your posts are set to index. Go to Rank Math SEO → Titles & Meta and ensure that the Index checkbox is enabled for your posts.
      Index Titles and Meta settings

    4. Manual Update: Sometimes, it may take a little time for the sitemap to update automatically. You can manually trigger an update by visiting your sitemap URL directly after making changes, or you can try clearing any caching plugins you might be using.

    5. Validate Your Sitemap: Use a sitemap validation tool to check if there are any issues with your sitemap configuration. You can use this Validate XML Sitemap tool to ensure everything is set up correctly.
      An example displaying how to validate a sitemap

    If you’ve checked all these settings and the issue persists, please reply to this ticket, and a human agent from the Rank Math Support team will assist you further. Thank you for raising this concern!

    Sources:
    Troubleshooting the “Couldn’t Fetch” Error in Google Search Console » Rank Math

    Tarun
    Rank Math free

    Hi, everything looks fine.

    The posts are published,
    they are set to be indexed,
    settings under Rank Math SEO → Sitemap Settings are enabled for the post type
    XML Validation Results shows No issues detected

    But still the posts are not in the sitemap…

    Hello,

    Could you please share a sample URL where it is not getting included in the sitemap?

    Meanwhile, please follow these steps to flush your sitemap cache:

    1. Flush the Sitemap cache by following this video screencast:
    https://i.rankmath.com/pipRDp

    2. Exclude the Sitemap files of the Rank Math plugin in your caching plugin. The cache could be via a plugin or from the server. For plugins or Cloudflare, please follow this article:
    https://rankmath.com/kb/exclude-sitemaps-from-caching/

    3. Disable the transient cache for the sitemap by applying this filter. This will make sure that your XML sitemap always reflects the latest changes on your site:

    /** 
     * Filter if XML sitemap transient cache is enabled.
     *
     * @param boolean $unsigned Enable cache or not, defaults to true
     */
    add_filter( 'rank_math/sitemap/enable_caching', '__return_false');

    If you’re not sure how to add this code, you can follow this guide:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Looking forward to helping you.

    Tarun
    Rank Math free

    I added this

    add_filter( ‘rank_math/sitemap/enable_caching’, ‘__return_false’);

    and it worked thanks

    Hello,

    We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on
    https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post

    about your overall experience with Rank Math? We appreciate your time and patience.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

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

The ticket ‘New posts not in sitemap’ is closed to new replies.