Sitemap can be read, but has errors: Invalid URL

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

    I’m sorry to hear that you are facing issues with an invalid URL in your page-sitemap.xml as flagged by Google Search Console.

    To identify the specific invalid URL causing the issue, you can follow these steps:

    1. Validate Your Sitemap: You can use the Validate XML Sitemap tool. Enter your sitemap URL and click VALIDATE SITEMAP. This tool will help you identify any issues with the URLs in your sitemap.

    Validate XML Sitemap

    1. Check if Your Sitemap is Accessible: You can use a tool like httpstatus.io to check if your sitemap is accessible. Enter your sitemap URL and check the status to ensure there are no issues preventing Google from accessing it.

    Check if sitemap is accessible in httpstatus tool

    If after following these steps you are still unable to identify the invalid URL, please reply to this ticket, and a human agent from our support team will assist you further. Thank you for bringing this to our attention.

    Sources:
    Troubleshooting the “Couldn’t Fetch” Error in Google Search Console » Rank Math
    Why GSC Shows “No Referring Sitemaps Detected”
    Indexed, Not Submitted in Sitemap – Google Search Console » Rank Math

    I’ve done all of the above but Google Search Console is still advising there’s an invalid URL and I have no idea which one they’re referring to.

    Hello,

    Thank you for contacting us and sorry for any inconvenience that this issue might 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. To do this, you need to add a small piece of code to your site’s functions.php file or use a plugin like Code Snippets.
    The code you need to add is this:

    
    /** 
     * 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/.

    It will show you step-by-step how to use the Code Snippets plugin or edit the functions.php file safely.

    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.

    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 can be read, but has errors: Invalid URL’ is closed to new replies.