Sitemap shows category, should not

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

    We apologize for the issue you are facing with your sitemap showing categories that should not be included. Thank you for raising this concern.

    Here are a few steps you can try to resolve the issue:

    1. Check Your Sitemap Settings: Ensure that the settings in Rank Math for including or excluding categories are correctly configured. You can do this by navigating to Rank Math > Sitemap Settings in your WordPress dashboard and verifying the settings for categories.

    2. Flush Permalinks: Sometimes, flushing permalinks can help resolve issues with sitemaps. Go to Settings > Permalinks in your WordPress dashboard and simply click Save Changes without making any changes. This can refresh the permalink structure and may help with the sitemap.

    3. Check for Plugin Conflicts: Use the Health Check plugin to check if there are any conflicts with other plugins that might be affecting your sitemap settings.

    4. Custom Code: If you suspect that old code might be affecting your settings, you can add a filter to your theme’s rank-math.php file to disable caching for the sitemap. Add the following code:

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

      This will ensure that Rank Math generates the sitemap dynamically without caching issues.

    5. Clear Cache Again: After making these changes, make sure to clear your website cache again, especially if you are using caching plugins like W3 Total Cache, WP Super Cache, or LiteSpeed Cache. Each of these plugins has specific settings to exclude sitemaps from caching, which you can find in their respective documentation.

    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.

    We hope this helps you get your sitemap sorted out!

    Hello,

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

    Please follow the steps below for initial troubleshooting:

    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/

    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.

    Hi
    Thanks for all the help, still dont get it working.

    Ive tryed everything above except the healt check plugin (checked it out but I dont dare) and I could not exclude the Sitemap files of the Rank Math plugin on the caching plugin (Fastest Cache Pro).

    I also deactivated Fastest Cache, didnt help.

    I did update a post and the Sitemap then was updated with today’s date – still with category’s tho, Im really stuck now …

    Regards,
    Nylund

    Hi
    I solved the problem, just went back and forth on (nearly) all setting and then it suddenly worked, strange but I happy 🙂

    Hello,

    Glad to hear that you’re able to sort the issue out.

    If you 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)

You must be logged in to reply to this ticket.