Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
How do I block referrers from domain extensions?
I am getting a lot of spam referrers from .porn
and .taxi
domain extensions. As both of those handles are irrelevant to our sites, I’m trying to figure out how to block all referrers from them.
Can anyone give me some pointers?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: How do I block referrers from domain extensions?
You can do that in the .htaccess file, see here
Offline
Re: How do I block referrers from domain extensions?
Hi Phil… Thanks for the link. I am currently using another method which does not need all the backslashes but the list is getting very big. As such I am trying to find a way to block all referrers who use .porn
and .taxi
extensions. Although I am all too aware that this is a losing battle I am not giving up just yet:)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#4 2017-04-19 16:28:32
- GugUser
- Member
- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,473
Re: How do I block referrers from domain extensions?
On this website perishablepress.com you can also find many tips.
Offline
Re: How do I block referrers from domain extensions?
GugUser wrote #305397:
On this website perishablepress.com you can also find many tips.
That’s for query strings :(
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#6 2017-04-19 17:45:13
- GugUser
- Member
- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,473
Re: How do I block referrers from domain extensions?
I know, but on the same site you can find many other tips.
Offline
Re: How do I block referrers from domain extensions?
GugUser wrote #305401:
I know, but on the same site you can find many other tips.
Thanks… I looked through it and did not find anything. I guess with the proliferation of new domain extensions, it will be just a matter of time before a blocking solution will turn up.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: How do I block referrers from domain extensions?
Yiannis, are you using purely Textpattern access/referrer stats, or another product/service?
Offline
Re: How do I block referrers from domain extensions?
Hi Pete,
I’m using slimstat & google analytics. The issue though is not only the stats but also the bandwidth. 3 days ago I got about 1600 ‘page views’ (within 20 minutes) from various .porn and .taxi spam referrers. This is basically the reason I want to block both extensions in the htaccess file.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: How do I block referrers from domain extensions?
colak wrote #305408:
This is basically the reason I want to block both extensions in the htaccess file.
Forgive me if I’m covering well-trodden ground: have you thought about Cloudflare? Cuts back on the bots significantly and has other benefits, too. The $20/month plan may well save you some hours and pay for itself.
Offline
Re: How do I block referrers from domain extensions?
gaekwad wrote #305422:
Forgive me if I’m covering well-trodden ground: have you thought about Cloudflare? Cuts back on the bots significantly and has other benefits, too. The $20/month plan may well save you some hours and pay for itself.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: How do I block referrers from domain extensions?
Got it! Here is the directives should anybody need it but do use with care. The site I am implementing this on, has low traffic and no known links from these domains.
RewriteEngine on
RewriteCond %{HTTP_REFERER} ^http(s)?://[^/]+\.adult/? [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://[^/]+\.kz/? [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://[^/]+\.porn/? [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://[^/]+\.pro/? [NC,OR]
# RewriteCond %{HTTP_REFERER} ^http(s)?://[^/]+\.ru/? [NC,OR]
# How can I exclude yandex.ru from here?
RewriteCond %{HTTP_REFERER} ^http(s)?://[^/]+\.taxi/? [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://[^/]+\.top/? [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://[^/]+\.ua/? [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://[^/]+\.xyz/? [NC]
RewriteRule .* http://127.0.0.1/ [R,L]
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline