How to Block Spam Referrers like darodar.com from Accessing Website?

前端 未结 14 2249
北海茫月
北海茫月 2020-11-22 16:22

I have several websites that get daily around 5% of visits from spam referrers. There is one strange things I noticed about this referrers: they show in Google Analytics, bu

相关标签:
14条回答
  • 2020-11-22 17:10

    .htaccess is not the best way. In my site I use GA, The option tracking information and then Reference exclusion list.

    Regards!

    0 讨论(0)
  • 2020-11-22 17:13

    apparently, this is done by a spammer by communicating directly with google analytics using your website's account ID. So they effectively tell google analytics they visited your page while in fact they never did. They identify themselves to analytics by means of an URL which THEY WANT YOU TO VISIT. So you see their traffic in google analytics and go check them out. They will have an amazon affiliate account hooked up and so they attempt to get a commission from your amazon purchases, for example.

    so .htaccess did nothing for me when I was fighting this one; you need to create a filter which filters out things like (.*)/.darodar/.com

    the real bad effect I have found from this is it invalidates my website statistics

    0 讨论(0)
  • 2020-11-22 17:14

    Most of the Spam in Google Analytics never access your site so you can't block them using any server-side solution.

    Ghost Spam hits directly GA and usually shows up only for a few days and then disappear, that's why some people think they blocked them from the .htaccess file but is just coincidence.

    This type of Spam is easy to spot since they use either a fake hostname or is not set. (See image below)

    The other type, Crawlers like semalt, actually access your site and can be blocked from the .htaccess file, however, there are just a few of them.

    So in summary, to stop spam in Google Analytics:

    • Crawlers: server-side solutions or filters in GA
    • Ghosts: ONLY filters in GA

    The only efficient solution to prevent being hit by ghost spam is by making an include filter with all your valid hostnames.

    First you need to make a REGEX with all the valid hostnames, something like this (you can find them on the network report)

    yoursite\.com|shoppingcart\.com|translateservice\.net
    

    These are some examples; you might have more or fewer hostnames. Once you have the REGEX, follow the same steps as above and change this:

    • Go to the admin tab in Google Analytics
    • Select FILTER under the View Column > New Filter
    • Filter type Custom > Include > Filter Field Hostname
    • File Pattern Copy the hostname expression you built

    For Crawlers you will have to create a different filter building an expression with all spammers

    spammer1|spammer2|spammer3|spammer4|spammer5
    
    • Filter type Custom > Exclude > Filter Field Campaign source
    • File Pattern Copy the referral expression

    Everytime you work with filters it is important that you keep an unfiltered view.

    If you need detailed steps for this solutions you can check this complete guide about Spam in Google Analytics.

    Guide to stop and remove All the spam in Google Analytics

    Hope it helps.

    Hostname report Example valid hostnames

    0 讨论(0)
  • 2020-11-22 17:17

    Blocking any bots at your web server level makes no sense - spammers are sending fake requests to Google Analytics web server. All they have to know is website domain name and Google Analytics ID linked to it. So you have to mask your Google Analytics ID at website code. For example, you can do like this at Google Analytics JS code:

    ga('create', 'UA-X' + 'XXXXX' + 'XX-X', 'auto');
    

    Spammer's bot should be able to execute JS code to parse your Google Analytics ID after this change (and not so many bots will be able to do it).

    https://nobodyonsecurity.com/security/fighting-google-analytics-referrer-spam

    0 讨论(0)
  • 2020-11-22 17:19

    You can restrict access use .htaccess or by filtering ALL robot visits from being tracked by Google Analytics. If that doesn't work, setup Google Analytics filtering. More details on how to do that can be found here: http://www.wiyre.com/google-analytics-darodar-forum-spam-what-is-it/

    They are Russian based but routing their spiders through China and the Philippines. Maybe it would be best to block the whole IP address at this point, they have multiple sub-domains.

    0 讨论(0)
  • 2020-11-22 17:20

    We have found that using htaccess is a good way to stop these spams. I have implemented below solution on my clients site which is working really well so far. Best way is to stop them by contains clause, e.g. spam priceg.com check for priceg in referrer url.

    Because many of these sites are creating sub domains and re hitting and when they tweak the url, hard coded conditions fail

    RewriteCond %{HTTP_REFERER} (priceg) [NC,OR]
    RewriteCond %{HTTP_REFERER} (darodar) [NC,OR]

    It is explained in detail here

    0 讨论(0)
提交回复
热议问题