Page is a not externally linkable
- WebmasterWorld
-- Website Analytics - Tracking and Logging
---- How do to deal with Illegitimate traffic ?


lucy24 - 2:34 am on Feb 20, 2012 (gmt 0)


I don't know from scripts; I just do it in htaccess.

How does GA tell if someone is a first-time visitor? Any information available to them is also available to you; they just process it differently.

:: detour to the usual place ::

Holy ###! I had no idea you could use mod_rewrite to set cookies. It's not a Swiss Army Knife, it's a whole bleedin toolbox!

Ahem.

:: making this up off the top of my head ::

RewriteCond %{HTTP_COOKIE} !.
RewriteCond %{HTTP_REFERER} ^-?$
RewriteRule (thispage|otherpage|thirdpage)\.html go_away.html [L]

or possibly

... http://www.example.com/goaway.html [R=301,L]

A redirect might even work better than a rewrite, because robots unlike humans have the option of not following redirects. 19 times out of 20 when they meet a 301 they say "Well, to heck with that" and go away without ever investigating. And that costs you even less bandwidth than even the smallest custom page. (My logs put a redirect at around 500 bytes, give or take 20. Do not ask me why they aren't all exactly the same size.)

Superfluous warning: Do not simply cut & paste the above.

Does your host give the option of simply shutting down the site for the rest of the month if you go over a certain usage level? Something tells me you're not making $262/month off all those unwanted robots.

:: off to investigate this cookie business ::


Thread source:: http://www.webmasterworld.com/analytics/4419326.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com