Sitemap dates not working

#1087307
  • Resolved Elias Mueller
    Rank Math free

    Hallo Rank-Math Team,

    Here I found maybe a small issue
    https://xyz.de/sitemap_index.xml
    Ther for example for page-sitemap.xml the last update field is 2025-07-22 14:04 +00:00
    But when u go inside, the last page is updated on 2025-08-13 05:05 +00:00.
    Should that not be the same?

    Or can i set this date?

    Greetings
    Elias

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

    We apologize for the issue you are facing with the sitemap dates. The “ date in your sitemap should ideally reflect the last modified date of the content within that sitemap. If you are seeing a discrepancy, it could be due to how the dates are being generated or cached.

    To ensure that the last modified dates are correctly displayed in your sitemap, you can check the following:

    1. Check the Date Schema: Ensure that your posts have the correct datePublished and dateModified properties set. You can verify this using the Rich Results Test tool by entering the URL of your post.

    2. Sitemap Settings: Navigate to Rank Math SEO → Sitemap Settings in your WordPress dashboard and check if there are any settings affecting how dates are displayed.

    3. Caching Issues: If you are using any caching plugins, clear the cache to see if that resolves the issue.

    4. Custom Canonicals: If you have set custom canonical URLs for your posts, it may affect how they appear in the sitemap. Consider removing custom canonicals if they are not necessary.

    If these steps do not resolve the issue, we recommend replying to this ticket with your site URL so a human agent from our support team can assist you further.

    Thank you for bringing this concern to our attention!

    Sources:
    How to Change the Date & Time on Your Posts/Pages » Rank Math

    Hey, thanks, but it is not helpfull.
    Since in the sitemap it is correct, but noch in des sitemap index.
    Can you help me further?

    Hello,

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

The ticket ‘Sitemap dates not working’ is closed to new replies.