by cj · 4y ago · 0 comments
I discovered our company's help documentation (and integration guides), hosted by readme.com, were completely de-indexed from Google for the past 3 months.
Our Readme docs were formerly our #1 source of organic (free) leads.
After investigating, Cloudflare (as configured by Readme) was blocking Googlebot when using Cloudflare Workers. Cloudflare was returning a 403 for Googlebot, but returning pages as usual for regular users.
The cause: we were using Workers to rewrite some URLs at the edge (replacing Readme's default images with optimized + compressed images, using Cloudflare's own image optimization service).
By using Workers to do this, it resulted in Readme's Cloudflare account receiving requests from our domain with "googlebot" useragent, but from an IP that wasn't verified as a googlebot IP address (I assume the Worker was requesting the Readme site using the Googlebot user agent but with whatever IP address is used when using CF Workers).
I emailed Cloudflare support but it was clear it would take a lot of time to get them to understand the issue (and probably longer to fix it).
So, we had to spend a lot of time figuring out how to allow Googlebot requests past Cloudflare's "fake bot" firewall rule.
In our own Cloudflare account, we have all security settings at the lowest sensitivity possible (or turned off completely). We serve over 500 billion requests a month (10+ TB of bandwidth), and the amount of blocked traffic to seemingly legitimate clients was surprisingly high.
I love Cloudflare (and own quite a bit of their stock) but I'm beginning to rethink my stance on their service. They make it extremely easy to enable powerful features with little visibility or control over the details of how those features work.
Another SEO nightmare is their "Crawler Hints" service. I highly recommend no one uses this if you are ever the target of automated security scanners (e.g. ones used by bug bounty white hat hackers). With "crawler hints" enabled and with a white hat hacker running a scan of your site hitting random URLs... results in bingbot, yandex, and other search engines attempting to index every single one of the URLs hit by the security scanners used by hackers.
Basically, it's a mess, and the only way to really fix it is to bypass cloudflare or spend a lot of time and money with Cloudflare debugging.
Next quarter I'm faced with the decision of either doubling down of Cloudflare and getting an Enterprise plan with them ($20k+) or just ripping them out of our stack and going back to our old AWS Cloudfront set up which has fewer POPs, but was much less of a hassle.
For example the Cloudflare Blog's RSS feed is very often blocked from public-cloud IP ranges with specific clients. This is an endpoint that is intended to be public, is cachable and even intended to be accessed by bots! This is a common issue that should be very easy to solve technically but highlights how Cloudflare is not a set-and-forget solution. If they can't configure their own blog (a super simple case) correctly it is clear that using the tool correct requires special care and monitoring of the limited visibility that they provide you.
Two things that have happened to me:
* Cloudflare has decided that I'm a bot and stalled me, given me capchas, or just blocked me outright.
* Cloudflare has shown me marketing claiming that 40% of traffic is bots.
I'm not particularly impressed.
1. For many years I have had great results with not sending a UA header. It is also, IMO, an effective means to discover the true number of websites that refuse to fulfill a request in the absence of a UA header, which IME is extremely small. For that small handful of sites, one can send a "fake" UA header of one's choosing. sec.gov is an example of such a site.
2. http://developers.google.com/static/search/apis/ipranges/goo...
Or maybe google crawler also runs on GCP and it's indistinguishable from regular $5 compute users
The vast majority of such requests are dodgy scanning operations likely looking for email addresses or exploitable forms.
To add to some of the other experiences here about no-UA: I've tried that before too, and it was notably worse than pretending to be Google; lots of sites just return "Internal Server Error" or similar messages.
Is Fastly a viable alternative for you?
Regardless of using Workers or not, Cloudflare requests URLs with the header `cf-connecting-ip` and `x-forwarded-for` set to the actual client's IP address, and the website behind CF should be using this header to get source IPs.
Was this definitely the cause? It's somewhat surprising to hear that requests would be rejected if the user agent doesn't match a set of hard coded IP addresses.
Were you able to resolve this in the end? If not and the cause is what you suspect then perhaps changing the user agent in your worker might be a workaround.
It’s fairly common for DDoS/scraping prevention, Googlebot (and most other crawlers) publish their IP ranges for that reason[0][1][2]. I don’t work at Cloudflare though, so no insider knowledge of what you folks are doing.
[0] https://developers.google.com/search/docs/crawling-indexing/...
[1] https://developers.facebook.com/docs/sharing/webmasters/craw...
[2] https://developer.twitter.com/en/docs/twitter-for-websites/c...
No, I haven't confirmed it. We jumped straight to fixing it without debugging the root cause. It's possible the cause is something totally different (I should have added this caveat in my original post). I was just speculating.