My google analytics getting messed up by sixdollarclick.com

I’ve been getting about 6000 garbage hits a day all coming from sixdollarclick.com It is totally messing up google analytics.

I just recently redid my website which involved moving from a windows host to an linux host.

Once I got the new site up on the linux host I tried Both these entries in the .htaccess file from info I found on various support sites. But neither seemed to stop this traffic from getting through:

RewriteEngine on
# Options +FollowSymlinks
RewriteCond %{HTTP_REFERER} sixdollarclick\\.com [NC]
RewriteRule .* - [F]

and

Order allow,deny
Deny from sixdollarclick.com
Allow from all

I am also trying filters in GA, but it sucks that they are not retroactive, and they still did not seem to filter out all the spam traffic.

Help.

The second version is incorrect as that tells apache that people at that domain (i.e. people who work at sixdollarclick.com) are not allowed to visit your site, as opposed to people who are referred to your site by that domain.

The first version should work though. Are you sure it doesn’t? If you are, are you sure mod_rewrite is enabled on the host?

It definitely was not working, but where the .htaccess file is concerned i am literally a stupid monkey cutting and pasting bananas I find lying around on the interweb.

I have done some more research this morning and tweaked my file a little bit. (I had Rewrite Engine on multiple times for each entry I had pasted into my file.) I will give it another go using the first version and update tomorrow.

Thanks

i had the same problem previously but what i did was migrate my hosting made some changes. The best platform is linux believe me

So it looks like its still not working. I already have 3000 hits from sixdollarclick this morning. Here is what I have in my .htaccess file.: (which I am assuming at this point I don’t have written correctly.)

Thoughts?

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /~easters2/
RewriteRule ^index\\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /~easters2/index.php [L]
# Options +FollowSymlinks
RewriteCond %{HTTP_REFERER} sixdollarclick\\.com [NC]
RewriteRule .* - [F]
</IfModule>

# END WordPress

<files wp-config.php>
  Order deny,allow
  deny from all
</files>

You need to put that code before the WP code, otherwise it’ll never fire (the code is executed in order). Also, get rid of the <IfModule …>…</IfModule>, you don’t need it


# Options +FollowSymlinks

RewriteEngine On
RewriteBase /~easters2/

RewriteCond %{HTTP_REFERER} sixdollarclick\\.com [NC]
RewriteRule .* - [F]

RewriteRule ^index\\.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /~easters2/index.php [L]

<files wp-config.php>
  Order deny,allow
  deny from all
</files>

Thanks for all the help on this ScallioXTX. Very much appreciate.

I have changed my htaccess as you have suggested. I’ll report back again tomorrow and see if it has done the trick.

Is there any particular Sitepoint book or reference that teaches creating/altering the htaccess file? I honestly don’t even know what kind/type of code we are dealing with here.

Thanks again.

And one other quick question:

The references in the file to easters2 are from my development phase. I set up the site on the live host account using the IP address… the all the url’s read http://xxx.xxx.xxx.xxx/~easters2 (something the web host does by default)

I have now gone live so the site resolves to the proper domain name. Should those entries in the htaccess now read something different?

Yes, you can probably remove them altogether. Remove the complete RewriteBase line, and replace RewriteRule . /~easters2/index.php [L] with RewriteRule . index.php [L]

Make sure to keep a backup of the old file when you try this in case it doesn’t work (some hosts are weird and won’t work this way, though it is generally supposed to work).

This code assumes index.php is in the root of the domain btw.

Hey just wanted to give an update. The changes you made to my htaccess worked. The past 2 days in analytics they are completed gone.

Thanks again ScallioXTX.

Good to hear! And you’re welcome :slight_smile: