Bingbot Unable to access sitemap - 403 Error

When I go into the Bing Webmaster tools UI, and attempt to submit our sitemap, I am getting a 403 error. I went through several troubleshooting steps including modifying our robots.txt file, creating a Cloudflare firewall rule to allow known bots. For the Super Bot Fight mode, I have settings set to “allow” and have not enabled static resource protection nor JavaScript detections. It wasn’t until I disabled our WAF geo rule where Bing was able to access the sitemap. This is our rule blocking IPs outside of North America: ( ne “US” and ne “CA” and ne “MX” and ne “PR”) This is a recent problem (within the past 8 or 9 days).

Once I allowed all IPs regardless of geo, Bingbot was able to access our sitemap. I would like to only allow North America IP address access, but am not sure how to do that and still be able to allow Bingbot to access my sitemaps. I did try utilizing the “known bots” rule however (and a bit comical), it blocked the Cloudflare site health check looking for any page status not equal to 2xx or 3xx.

Add a user-agent exemption to your WAF rule?

the Bingbot user agent I’m used to seeing is Mozilla/5.0 (compatible; bingbot/2.0; + but you might want to just do a “contains bingbot”

Do keep in mind that user agents can be easily spoofed so foreign IPs could potentially sneak in this way, I see people impersonating Googlebot occasionally (not too often) but I’ve never noticed anyone impersonating Bing.


Great idea; it works…much appreciated!

1 Like

Well, you specifically told Cloudflare to block everything outside of these countries and that request will likely have come from outside of these regions.

For starters, you will want to use not in instead, plus you should use known bots, as you already mentioned. The following expression should work just fine

(not in {"CA" "MX" "PR" "US"} and not

This will block all requests which are not from these countries and which are not bots known to Cloudflare, so that particular request should not be blocked any more.


Thanks Sandro! I am set, and all is good now I appreciate your response.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.