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 14 replies - 16 through 29 (of 29 total)
  • I have shared the link. please check the sensitive data

    Hello,

    You’re getting this error because your robots.txt file is showing this:

    Please navigate to Rank Math > General Settings > Edit robots.txt and add the following default Rank Math robots.txt rules:

    User-agent: *
    Disallow: /wp-admin/
    Allow: /wp-admin/admin-ajax.php
    Sitemap: https://www.onlyway.store/sitemap_index.xml

    After adding the rule, you can clear your site and browser cache and try again.

    We hope this helps you resolve the issue. Don’t hesitate to contact us again with any other questions or concerns regarding Rank Math. We are always happy to help.

    Thank you for choosing Rank Math!

    THE ERROR MESSAGE NOW.

    “Contents are locked because a robots.txt file is present in the root folder.”

    I cannot edit it.

    Hello,

    To fix the error, you should delete the physical robot.txt file from the root of your WordPress installation. If you’re unsure how to do this, feel free to contact your website hosting company for assistance.

    You can find more information here: https://rankmath.com/kb/cant-edit-robots-txt/#num-1-presence-of-a-physical-file

    If you need further assistance, don’t hesitate to reach out.

    “robots.txt is not valid Lighthouse was unable to download a robots.txt file.”

    I followed as instructed and now this is the new error message in pagespeed.

    Please help

    Hello,

    This can happen when you use a content delivery network (CDN) like Cloudflare. Rank Math does not create a physical robots.txt file on your site. Instead, the file is created and displayed when a user visits your robots.txt URL. So you can safely ignore this error if your robots.txt file is available at https://yourdomain.com/robots.txt. This follows SEO best practices and Googlebot will be able to follow the rules in your robots.txt.

    Alternatively, you can also add this rule in your Robots.txt:

    Disallow: /cdn-cgi/

    Here is a guide that can help: https://rankmath.com/kb/fix-common-robots-txt-issues/#robots-txt-is-not-valid-in-pagespeed-insights

    You can check this guide to learn how to edit your robots.txt file using Rank Math: https://rankmath.com/kb/how-to-edit-robots-txt-with-rank-math/

    Hope that helps and please do not hesitate to let us know if you need my assistance with anything else.

    User-agent: *
    Disallow: /wp-admin/
    Allow: /wp-admin/admin-ajax.php
    Sitemap: https://www.onlyway.store/sitemap_index.xml.. I already have this code in this robot.txt edit in rankmath as suggestd earlier.

    How, to add this new code, do I delete the old one?

    Hello,

    Your robots.txt already contains those rules, so you can skip adding them.

    You can also visit it at this link: https://www.onlyway.store/robots.txt

    Looking forward to helping you.

    What needs to be skipped and what is to be added? there are two different codes suggested by RankMath and my sitemap is still not indexing in the pagespeed site.

    Help me fix this issue> I think we have been beating around the bushes for too Long.

    Thank you.

    Hello,

    We mean that the current rules in your robots.txt are correct and follow SEO best practices.

    You can test your robots.txt file to confirm yourself using this tool: https://technicalseo.com/tools/robots-txt/

    The rule: Disallow: /cdn-cgi/ is to block the Cloudflare endpoints since Search engine crawlers can encounter errors when crawling these endpoints and — though these errors do not impact site crawling or rankings — they may surface in your webmaster dashboard

    SEO and other web crawlers may also mistakenly crawl these endpoints, thinking that they are part of your site’s content.

    Please refer to this thread: https://support.google.com/webmasters/thread/186999666/cloudflare-cdn-cgi-endpoints-indexed-though-blocked-by-robots-txt?hl=en

    So, if you use Cloudflare, you can have the following in the robots.txt file instead:

    User-agent: *
    Disallow: /wp-admin/
    Disallow: /cdn-cgi/
    Allow: /wp-admin/admin-ajax.php
    
    Sitemap: https://www.onlyway.store/sitemap_index.xml

    We hope this helps. Please let us know if you have further questions or concerns.

    Thank you.

    All good now. Thank you team RankMath, for all the help.

    Hello,

    Glad that helped.

    If you have any other concerns, please don’t hesitate to contact us anytime so we can assist you further.

    Looking forward to helping you.

Viewing 14 replies - 16 through 29 (of 29 total)

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