Reputation: 371
I have a site that is getting hit had with referer spam from sites with a domain that is always:
http://scanner-{somethin-unique-here}.top
How can I use my htaccess file to block all referers from scanner-xxx.top?
Upvotes: 1
Views: 209
Reputation: 785286
In your site root .htaccess you can use this rule based on HTTP_REFERER
variable to block but just remember those sites can change HTTP_REFERER
at some point as well:
RewriteEngine On
RewriteCond %{HTTP_REFERER} https?://scanner-.*\.top [NC]
RewriteRule ^ - [F]
Make sure this rule is right at the top as first rule.
Upvotes: 1