Hi, I have two origin servers behind a load balancer and I would like to direct search engine crawlers to only one specific server.
The reason for this is that we are migrating on old site to a new tech stack and we want to retain the seo by keeping the search engine crawlers going to the old site until the new site is at parity with the same content.
I know that AWS can do this, but is there a mechanism in CloudFlare to do this ?
Via the default load balancer you can’t, but you can use a simple worker (just a few lines on JS) to do just that, even without the need to use a load balancer per se.
It’s not a redirect, the Worker can do a request to whatever (with some limits) origin it wants. I can’t find the example on the documentation anymore, but you can most certainly do that.
It can (and there is a quick solution), just not natively in the load balancer product.
I could see how that snippet could be adapted and combined with inspecting the headers. It would be a lot more more than just letting the LB do it but it may be a solution in our instance.