A
A
Andrei St2017-09-18 12:06:45
PHP
Andrei St, 2017-09-18 12:06:45

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

3 answer(s)
I
Ivan, 2017-09-18
@helpik94

https://www.bjornjohansen.no/exclude-requests-from...

V
Vladimir Mukovoz, 2017-09-18
@castomi

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.

A
Alexander Aksentiev, 2017-09-18
@Sanasol

googlebot , namely subnets 1.1.

check the referrer for any of the specified "technologies". Instead of a subnet
In general it is senseless.
The www prefix has not been relevant for hundreds of years.
Previously, it was needed, why you can find out in Google.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question