When adding posts to my site via the REST API /wp-json/wp/v2/posts/ Rank Math do

#789911
  • Resolved Anonymous
    Rank Math free

    When adding posts to my site via the REST API /wp-json/wp/v2/posts/ Rank Math does not updating sitemap_index.xml

    I am sending articles on my site using https://site/wp-json/wp/v2/posts REST API.
    but sitemap_index.xml not updating even after articles is published

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello,

    I’m sorry to hear about the issue you’re facing with Rank Math not updating the sitemap_index.xml when adding posts via the REST API.

    When adding posts to your site using the REST API, Rank Math should automatically update the sitemap_index.xml to include the newly published articles. If you are experiencing delays or the sitemap is not updating as expected, there are a few steps you can take to troubleshoot this:

    1. Check Sitemap Generation: Ensure that the Sitemap module is enabled in Rank Math. You can verify this by going to WordPress Dashboard → Rank Math SEO → Dashboard → Sitemap Settings.

    2. Manually Refresh Sitemap: You can manually refresh the sitemap by visiting your sitemap URL directly. For example, if your sitemap URL is https://rankmath.com/wp-content/uploads/2023/01/enable-sitemap-modules-1.jpg you can open this link in your browser to trigger a refresh.

    3. Check Server Rewrite Rules: If the sitemap is still not updating, you may need to add rewrite rules to your server configuration manually. Depending on whether you are using an Apache or Nginx server, specific rewrite rules may be required. You can find detailed instructions for both server types in our knowledge base article on Rank Math Sitemap Issues and Their Fixes.

    If after following these steps the issue persists, please reply to this ticket, and a human agent from our support team will assist you further.

    Thank you for bringing this to our attention. We appreciate your patience as we work to resolve this issue for you.

    Best regards,
    Rank Math Support Team

    Sources:
    Does Rank Math Come With a NewsPack? » Rank Math
    Rank Math Sitemap Issues and Their Fixes » Rank Math
    Working With the News Sitemap in Rank Math » Rank Math
    How to Get Your Website Listed in Google News » Rank Math

    Hello,

    Thank you for contacting us and sorry for any inconvenience that might have been caused due to that.

    Can you please try to follow the steps below and see if that works for you?

    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. If the above steps don’t seem to work, kindly apply the following filter to your site.

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

    Here’s how you can add filter/hook to your WordPress site:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Let us know how it goes. Looking forward to helping you.

    Thank 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 2 replies - 1 through 2 (of 2 total)

The ticket ‘When adding posts to my site via the REST API /wp-json/wp/v2/posts/ Rank Math do’ is closed to new replies.