Site map 403 error

#530223
  • Resolved Sandi Larry
    Rank Math free

    https://imgur.com/a/XLfkPL4

    I tried everything on your site but couldn’t find a solution.

    When you create an xml file using https://www.xml-sitemaps.com/ and upload it to root, the xml looks fine and is approved by the search console. But when I want to enable rank math sitemap, I get 403 couldnt fetch error.

    I can’t get confirmation from search console without adding an xml file in root. What is the reason? I’m going crazy I’ve been struggling for more than 10 hours and I couldn’t find the solution. I was using Yoast pro and wanted to switch to rankmath pro but the sitemap is driving me crazy. Help pls

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

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.

    We’ve tried checking your site https://artwoonz.com/sitemap_index.xml, but we’re getting 403 forbidden.

    As you can see sitemap is returning a 403 error when Googlebot is trying to access it. Please get in touch with your host to confirm there is no blocking by a firewall or server for Googlebot

    Looking forward to helping you.

    Thank you.

    https://imgur.com/a/PKVpwJY

    When I add the sitemap to the search console, it gives 403 error. I’m looking at the logs on the Plesk and I’m getting a 403 error. I am using the sitemap feature of rank math. When you physically create a sitemap.xml file, put it in htdoc and edit from robots.txt, you can see it, but you know rank math does not give a physical xml file, so I edit from robots.txt only but I get a 403 error. I set up a second site on the same server and it worked without any problems. Something is blocking googlebot and bingbot but I couldn’t figure it out. The screenshot below is the log result when I query sitemap_index.xml in the search console. Mod_security fail2ban firewall vs. I turned it off, disabled all plugins, still the same.

    Help me. I am using Plesk vps server.

    Hello,

    We can’t see exactly what is preventing the bots from accessing the sitemap, but we can also see that currently, the sitemap seems to be getting redirected to the homepage.

    Our recommendation is that you get in touch with your hosting provider and make sure that any firewall, both on the server, on the WordPress installation or some other place like Cloudflare is allowing bots to crawl the website.

    Don’t hesitate to get in touch if you have any other questions.

    Sitemap_index.xml now open s fine but I still get 403 error by googlebot. The problem is still not resolved.

    A code caused a problem in the wp-config.php file. Delete this code completely and everything will work.

    Code: if (preg_match(“/sqlmap|select|from|[\\\*]|[+]|drop|orderby|where/i”, $_SERVER[“HTTP_USER_AGENT”])): header(‘HTTP/1.0 403 Forbidden’); exit; endif; /**

    Proof:
    https://imgur.com/a/4P8VWz9

    Hello,

    We do not add this sort of code to your wp-config.php file. I’m not sure if it was inserted by any other plugin/theme.

    However, It’s good news and we’re really glad that removing the lines of code resolves this issue.

    Please feel free to reach out to us again in case you need any other assistance.

    We are here to help.

    Thank you.

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

The ticket ‘Site map 403 error’ is closed to new replies.