Answer the question
In order to leave comments, you need to log in
How to redirect everyone except google bot?
I need one of my sites to be accessible only for googlebot , namely subnet 1.1. and all the other ah pi who access it are redirected to another domain.
https://www.site.com/ to redirect to https://www.site.one for everyone who is not a Google bot. In general, the site is only for the Google bot
Answer the question
In order to leave comments, you need to log in
Use if and redirect accordingly. You can filter out the bot not only by ip, but also by user agent.
https://nginx.ru/ru/docs/http/ngx_http_rewrite_mod...
https://nginx.ru/ru/docs/http/ngx_http_core_module...
https://nginx.ru/ru/docs/http/ ngx_http_rewrite_mod...
Everything is quite simple, just look at the links I gave.
googlebot , namely subnets 1.1.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question