Sitemap issue

#869133
  • Resolved Fiber
    Rank Math free

    My website still has sitemap issue.

    It opens perfectly and search console fetches it without problem. But the issue is that when I publish new post, page or custom post, it doesn’t update sitemap automatically.

    I have to go to Links Per Sitemap, change it to 201 or something, save and then it appears in the sitemap.

    I use Digital Ocean droplet, Ubuntu, NGINX, CloudPanel. I excluded sitemaps from cache, from cloudpanel varnish cache settings. I don’t use other cache.

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

    We apologize for the issue you are facing with your sitemap not updating automatically when you publish new content. Thank you for raising this concern.

    Since you are using NGINX, it’s important to ensure that your sitemap settings are correctly configured. Here are a few steps you can take to troubleshoot this issue:

    1. Flush Permalinks: Sometimes, flushing permalinks can help resolve sitemap issues. You can do this by navigating to WordPress Dashboard → Settings → Permalinks and clicking the Save Changes button without making any changes.
      Flush Permalinks settings

    2. Disable Transient Caching: If you haven’t already done so, you can add the following filter to your theme’s rank-math.php file to disable transient caching of your sitemap:

      add_filter( 'rank_math/sitemap/enable_caching', '__return_false');
    3. Check for Plugin Conflicts: Ensure that there are no conflicting plugins that might be affecting the sitemap functionality. You can use the Health Check plugin to help identify any conflicts.

    4. Review NGINX Configuration: Make sure your NGINX configuration is set up correctly for handling sitemaps. You can refer to our guide on XML Sitemaps on NGINX Servers for more details.

    If these steps do not resolve the issue, please reply to this ticket, and a human agent from the Rank Math Support team will assist you further.

    Thank you for your patience, and we hope to help you resolve this issue soon!

    Sources:
    Rank Math XML Sitemaps on NGINX Servers » Rank Math

    Hello,

    Thank you for contacting us. We apologize for any inconvenience this issue may have caused.

    If the issue persists then try disabling the transient cache for the sitemap. This will make sure that your XML sitemap always reflects the latest changes on your site. Kindly add this code snippet to 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/.

    After you add the code, please clear any cache on your site or server and check your XML sitemap again. If you’re still facing issues with the sitemap, please let us know – we are happy to investigate further.

    Fiber
    Rank Math free

    OK. I added it and see if it works.
    Also, in RankMath > Status & Tools there is Remove Rank Math Transients. Can this work too?

    Hello,

    The clear transients option in Status & Tools is for WordPress Transients, so it will not affect the sitemap generation.

    Here’s a link for more information:
    https://rankmath.com/kb/rank-math-status-and-tools/#rank-math-transients

    Looking forward to helping you.

    Fiber
    Rank Math free

    So, your script worked.

    Can you tell me what’s the reason? is it because of the NGINX?

    I don’t have that issue on Apache or Litespeed.

    Hello,

    You may check with your web host if there are any caching rules on your server configuration.

    As an added measure, we recommend the filter from our plugin to enforce the no caching rule on the sitemaps.

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

The ticket ‘Sitemap issue’ is closed to new replies.