Sitemap is not valid

#759240
  • Resolved Danny
    Rank Math free

    I noticed that GSC has not been able to fetch my sitemap. When I clicked on my XML URL for the sitemap, it displayed an error and did not load. When checked with a sitemap validation tool, it stated that the sitemap is not valid. What needs to be done to sort this issue?

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

    I’m sorry to hear that you are facing issues with your sitemap not being valid and Google Search Console not being able to fetch it. To address this problem, we need to ensure that your sitemap is correctly configured. Here are the steps you can follow to troubleshoot and fix the issue:

    1. Validate Your Sitemap:
      • Use the Validate XML Sitemap tool to confirm if your sitemap is correctly configured.
      • Enter your sitemap URL into the tool and click VALIDATE SITEMAP.
      • If your sitemap is correctly configured, the tool will return a success message with no issues detected.

    Validate Your Sitemap

    1. Ensure Correct Sitemap Submission:
      • Make sure you have submitted the correct sitemap to Google Search Console. You should submit sitemap_index.xml and ensure that all inner sitemaps like post-sitemap.xml are showing up in your Google Search Console under sitemap_index.xml.

    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 concern to our attention. We are here to help you resolve this issue.

    Hello,

    We’ve checked your sitemaps, and they seem to be working fine.

    In this case, please follow these steps to flush your sitemap cache:

    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. Disable the transient cache for the sitemap by applying this filter. This will make sure that your XML sitemap always reflects the latest changes on 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/

    Let us know how this goes.

    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 ‘Sitemap is not valid’ is closed to new replies.