XML site map error

#844740
  • Resolved only way
    Rank Math free

    Dear Rank Math Team,

    I’m writing to report a discrepancy between the validation of my robots.txt file on PageSpeed Insights and Google Search Console.

    While Google Search Console doesn’t indicate any issues with my sitemap URLs, PageSpeed Insights is reporting the following errors:

    [moved to sensitive data section]
    I’m using Rank Math as my SEO plugin. I’ve attached a copy of my current robots.txt file for your reference. (Please consider attaching your robots.txt file if comfortable)

    I’m concerned that this discrepancy might affect my website’s indexing and overall performance. Could you please investigate the issue and provide guidance on how to resolve it?

    Thank you for your prompt attention to this matter.

    Sincerely,
    Rong

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

    We apologize for the issue you are facing with the validation of your robots.txt file on PageSpeed Insights. Thank you for raising this concern.

    The errors you are seeing in PageSpeed Insights regarding "Unknown directive" typically occur when there are rules in your robots.txt file that are not recognized by the tool. Since Rank Math creates a virtual robots.txt file, it’s important to ensure that the directives used are valid and correctly formatted.

    Here are a few steps you can take to resolve this issue:

    1. Check Your robots.txt File: Ensure that there are no unsupported or incorrect directives in your robots.txt file. You can manage your robots.txt through the Rank Math settings by navigating to Rank Math SEO → General Settings → robots.txt.
    2. Test Your robots.txt: Use the robots.txt Tester to check if your current rules are valid and to see how Googlebot interprets them.
    3. Review PageSpeed Insights: If your robots.txt file is accessible at `https://rankmath.com/kb/fix-common-robots-txt-issues/#robots-txt-returns-blank-page-or-404-error you can also check it directly in PageSpeed Insights to see if it returns any errors.
    4. Ignore Non-Critical Errors: If Google Search Console does not report any issues with your sitemap URLs, it may be safe to ignore the PageSpeed Insights errors, especially if your site is functioning correctly.

    If you continue to experience issues, please reply to this ticket, and a human agent from the Rank Math Support team will assist you further.

    Thank you for your understanding, and we hope this helps resolve your concerns!

    Sources:
    Common robots.txt Issues & How to Fix Them » Rank Math
    Rank Math Sitemap Issues and Their Fixes » Rank Math

    Hello,

    Your sitemap is returning a white page error.

    For initial troubleshooting, 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.

    I followed the steps but the issue remains. Kindly help

    Hello,

    To investigate this issue further, we might need to take a closer look at your website and settings. Please follow these steps:

    • Edit the first post on this ticket and include your WordPress and FTP logins in the Sensitive Data section. This is a secure section that only our support staff can access.
      Sensitive Data Section
    • Make sure you take a complete backup of your website before sharing the information with us.
    • If you prefer, you can use this plugin to generate a temporary login URL to your website and share that with us instead: https://wordpress.org/plugins/temporary-login-without-password/
    • You can also use this plugin to monitor what changes our staff might make on your website (if any): https://wordpress.org/plugins/wp-security-audit-log/

    We appreciate your cooperation and patience.

    Thank you for choosing Rank Math.

    Please provide your email id. Thank you

    Hello,

    You can use s******@r*********** email address and put any First & Lastname.

    Once done, please add the login details in the sensitive data section of this ticket.

    Looking forward to helping you.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Shared as requested. Kindly check and confirm. Thank you

    Hello,

    This issue is most probably related to your server configuration.

    Since the .htaccess is a sensitive file and we don’t have logins for your website files to revert any changes immediately, please try adding this code and clear your website’s cache.

    # START of Rank Math Sitemap Rewrite Rules
    RewriteEngine On
    RewriteBase /
    RewriteRule ^sitemap_index.xml$ /index.php?sitemap=1 [L]
    RewriteRule ^([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 [L]
    RewriteRule ^([a-z]+)?-?sitemap.xsl$ /index.php?xsl=$1 [L]
    # END of Rank Math Sitemap Rewrite Rules

    You may also get in touch with your web host for assistance in modifying the file.

    Let us know how this goes.

    Hi,

    These steps are a little too technical and there is a high chance of things going wrong without proper instruction. So, if you could kindly suggest an alternative that’s easier and safer to use or guide me through the suggested process in a very non-technical manner.

    Thank you

    Hello,

    Please share credentials for your FTP access with us in the sensitive data section so we can help apply the changes.

    Thank you for choosing Rank Math

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hello,

    The filter wasn’t present on the site. We have added the filter to disable the sitemap cache, and now the sitemap is working fine.

    Please check and let us know if you need our assistance with anything else.

    Thank you.

    Hi,

    Just checked it and pagespeedinsight still does not recognize XML sitemap. The same error message appears.

    Hello,

    We tested your main sitemap and the sub-sitemaps and no issues were detected on them:
    https://imgur.com/siuiiGQ
    https://imgur.com/urQJ3To

    Please clear your browser cache and check again. You can share a screenshot of the error using this tool: https://imgur.com/upload

    We look forward to helping you.

    Thanks.

Viewing 15 replies - 1 through 15 (of 29 total)

The ticket ‘XML site map error’ is closed to new replies.