have error in genre-sitemap.xml , tag-sitemap.xml

#1006513
  • D A
    Rank Math free

    hi, i have an error which i think cuz of the date, in google search console i get his error
    The sitemap can be read, but contains errors.
    Invalid date
    151 cases
    Incorrect date detected. Correct this date or its format before trying again.
    Examples
    Line 11845
    Parent tag:
    URL
    Label:
    last mod
    Line 11849
    Parent tag:
    URL
    Label:
    last mod
    Line 11853
    Parent tag:
    URL
    Label:
    last mod

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

    We apologize for the issue you are facing with your genre-sitemap.xml and tag-sitemap.xml. The error regarding the invalid date in your sitemap can often be resolved by ensuring that the dates are formatted correctly.

    Here are a few steps you can take to troubleshoot and potentially fix this issue:

    1. Check Date Format: Ensure that the dates in your sitemap are in the correct format. The standard format is YYYY-MM-DD (e.g., 2023-10-01).

    2. Remove Last Modified Dates: If you want to remove the ` tag from your sitemap, you can use the following filter in your theme’srank-math.php` file:

      add_filter( 'rank_math/sitemap/index/entry', function( $index, $type ) {
         if ( isset( $index['lastmod'] ) ) {
             unset( $index['lastmod'] );
         }
         return $index;
      }, 10, 2 );

      This will prevent the last modified dates from being included in your sitemap.

    3. Validate Your Sitemap: Use a sitemap validation tool to check for any other issues. You can use the Validate XML Sitemap tool to ensure everything is configured correctly.

    4. Check for Plugin Conflicts: Sometimes, other plugins may interfere with how dates are generated. You can check for conflicts using the Health Check plugin.

    If these steps do not resolve the issue, please reply to this ticket with your site URL so we can assist you further. A human agent from our support team will take over and provide more specific guidance based on your situation.

    Thank you for raising this concern!

    Sources:
    Rank Math Sitemap Issues and Their Fixes » Rank Math
    Troubleshooting the “Couldn’t Fetch” Error in Google Search Console » Rank Math

    This is an automated reply from Rank Math Support Bot. Your ticket has been assigned to a human agent and we will get back to you shortly.

    D A
    Rank Math free

    Hello,

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

    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/

    Once done, clear your website cache, remove all the submitted sitemaps, and resubmit only the /sitemap_index.xml in the Search Console.

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

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

You must be logged in to reply to this ticket.