Is it possible to force login based on IP address?

I am trying to keep bots from surfing my pages. So I want to force login from all Ip addresses that are not in the top 4 search engines. Is it possible?

+2


source to share


3 answers


Do you consider using a robots.txt file to minimize unwanted traffic with automated spidering tools?

You can have multiple Disallow lines for each user agent (i.e. for each spider). Below is an example of a longer robots.txt file:

User-agent: *
Disallow: /images/
Disallow: /cgi-bin/

User-agent: Googlebot-Image
Disallow: / 

      



Here is an example that prohibits everything except google

User-agent: *
Disallow: /

User-agent: Googlebot
allow: / 

      

Warning: This method does not guarantee that banned agents will not pass through your site, it will simply ask them in a standardized way that most of these tools understand.

+4


source


Yes. You can force login to all of your pages, except for a few IP addresses. It depends on which web server you are using and which access control is allowed?



0


source


If you want to force login for all but 4 search engines, you can request authorization from all but 4 search engines or automatic login.

0


source







All Articles