Reputation: 41
How can I block IDN domain in .htaccess
file, or just a domain with special/ Internationalized marks? These domains generate referer spam.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_REFERER} ^https?://([^.]+\.)*xxx\.com [NC]
RewriteRule .* - [F]
</IfModule>
I use this to block site and subsites. But I want to block domains which contain special marks like: ąłść
etc. and not just one site with xxx.com
address but all sites which contain special marks. It's called IDN.
Upvotes: 1
Views: 336
Reputation: 71
"Spamming is definitely one of the most annoying things software and e-mailing systems have to handle. However, usage of domain names as a referer spam, is not solely restricted to Internationalized Domain Names. By and large, spammers use the cheaply/freely available domain names for such purposes as they have a very short shelf life and soon get blocked by the software/e-mailing systems. There was a time in the IDN domain's lifecycle, during their initial period, when they were made available by some registries at very economical rates or even free in some cases. That is no longer the case. There are many IDN based websites offering actual services to the users. Summarily blocking access to all the IDN domains might be detrimental to your services.
I would recommend all the readers of this conversation to not follow this practice of blocking the IDN domain names. Rather, get involved with the fantastic group of people working at "Universal Acceptance Steering Group" (https://uasg.tech/), spreading awareness about Internationalized Domain Names (IDNs) and Email Address Internationalization (EAI). Do make it a point to visit their Document Hub at - https://uasg.tech/document-hub/ to see the thoroughly researched material created solely for the benefit of the internet community at large."
Upvotes: 0
Reputation: 41
Use this condition:
RewriteCond %{HTTP_REFERER} ^https?://.*xn--.* [NC]
It blocks IDN domains.
Upvotes: 1