|
|
Referer Spam
Referer Spam
is a kind of
search engine
-targeted
spam
. The technique involves making repeated
web site
requests using a fake
referer
url
pointing to a spam-advertised site. Sites that publicize their referer
statistics
will then also link to the spammer's site. This benefits the spammer because of the free link, and also gives the spammer's site improved search engine link placement due to link-counting algorithms that search engines use.
As with
email
spam, web site operators who receive unwanted referer spam may respond using filtering.
An example configuration fragment for filtering using the
Apache
server is as follows:
RewriteEngine On
#a known spamming site
RewriteCond %{HTTP_REFERER} ^http://(.*\.)?egolddomain.(com|net)(/.*)?$ [NC,OR]
#various "porno" words when separated by line breaks are probably spam
RewriteCond %{HTTP_REFERER} ^http://.*(\b)porn(o(graph(y|er))?)?(\b).* [NC,OR]
#referer url's with excessive - characters are probably spammers
RewriteCond %{HTTP_REFERER} ^(http://www.)[a-z]+-[a-z]+- [NC,OR]
#can add as many rules as desired following the pattern of the previous line
#set an environment variable "BAD_GUY" so we can send their logs to a different file
RewriteRule ^(.*) %{HTTP_REFERER} [R=301,E=BAD_GUY:1,L]
#because we have set E=BAD_GUY above, we can do this in our log file:
CustomLog /var/log/apache/access.log combined env=!BAD_GUY
CustomLog /var/log/apache/access_bad.log combined env=BAD_GUY
The "fake" web site hits will go to access_bad.log, whereas normal traffic goes to access.log. The "RewriteCond" lines contain
Regular expressions
that can be used to match any undesirable traffic, thereby excluding it.
See also
Retrieved from http://en.wikipedia.org/wiki/Referer_spam
Reprinted from Wikipedia, The Free-Content Encyclopedia under the GNU Free Documentation License.
Site Promotion Articles Indexes:
|
|