Forum Moderators: phranque
## Deny RU and UA traffic
RewriteCond %{HTTP_REFERER} \.(ru|ua)(/|$) [NC]
RewriteRule .* - [F]
ErrorDocument 403 "Access Denied"
RewriteCond %{HTTP_REFERER} \.(ru|ua)
RewriteCond %{HTTP_REFERER} \.(ru|ua)(/|$)
RewriteCond %{HTTP_REFERER} !(google|yandex|\.mail)\.
RewriteRule (^|\.html|/)$ - [F]
It's "used to" because after I went to header-based lockouts, this particular rule was no longer needed. My hosting company says that it's typically in one of the htaccess files.
Perhaps you can elaborate on header-based lockouts...is it something easy to set up?
SetEnvIf Accept ^$ noaccept
(meaning: if the “Accept” header is absent or empty, set this variable) BrowserMatch Googlebot !noaccept !nolang
(There is a separate rule, elsewhere, for robots that claim to be the Googlebot but come from the wrong IP.) Deny from env=noaccept
Deny from 11.22.33
with its endless whack-a-mole of having to add IP ranges constantly as new server farms are created or discovered--or delete them as old ranges are taken over by human mobiles.