How To Block Semalt.com Referrer In Google Analytics

FREE: Click Here To See My Number #1 Recommendation For Making Money Online

Have you noticed the domain semalt.com appearing within the list of referrals in your Google Analytics? Don’t worry, you’re certainly not alone – in fact thousands of webmasters over the past few months have been noticing the same thing and for the majority it’s nothing but a nuisance. You can read the article below about Semalt, or you can jump straight to the bit of code that every webmaster affected by Semalt should be adding to their .htaccess file.

Semalt Referral

What exactly is Semalt?

Semalt is apparently some sort of tracking/reporting tool that webmasters can use to monitor their competition and *apparently* improve their search positions, though I can’t really go in any more depth than that because their website gives so little away (on purpose – to try and draw us curious cats in).

Basically they appear to be using their crawler as a clever (but cheeky & annoying) marketing technique – though they claim this isn’t the case (but we all know it is). As you’re probably aware most crawlers come and go without a trace, but not Semalt. Semalt instead leave behind a referrer which can be seen in many tracking tools such as Google Analytics. As any curious webmaster would you follow the link & end up at their website were you’re then left with nothing but a sign up form to join their service, or the option to log in if you’re an existing member. Their website gives so little away & I’m guessing the idea is that it draws curious folk in because people want to find out more about the service and why they are getting referrers from their domain. It looks like it works too if their numbers are anything to go by as the bar across the top of their page reckons they got over 8000 signups yesterday alone.

Semalt Signup Bar

According to Semalt’s website they receieved 8232 signups yesterday alone.

Semalt of course claim that they don’t leave the referrer behind as a marketing technique, and it’s required for their product to work – however if they give you the ability to remove your website from the Semalt crawler then surely any webmaster that was using the product to monitor your website as competition would no longer see any reports meaning the product would be useless… Hmm I think someone may be telling fibs.

Is Semalt actually any good?

To be honest, I can’t really comment as I’ve never used it (or known anyone who has). However I’d imagine that if it was as great as they say it is then they’d probably tell you a bit more about it on their website & let the product do the talking for itself as opposed to using cheeky referrer techniques to market it.

Semalt Logo

Semalt’s techniques are angering webmasters.

One thing I do know is that their tactic of automating visits & leaving semalt.com behind as the referrer is causing a lot of anger from webmasters. These webmasters seem to have channeled their anger through to the Semalt team on twitter but from their responses it doesn’t seem they have any intention of changing their ways anytime soon.

If Semalt have no plans to change their ways, how can we block the referrer from showing up in our reporting tools?


Method 1: Remove your websites from the Semalt crawler. *gahhh whatever you do don’t do this one*
Semalt have a page on their website that allows you to enter the domain names of your website(s) and processes them for removal from their crawler.  Surprise surprise there is no link to this page from their homepage and it instead takes quite a bit of digging to find. To save you the hassle here it is: http://semalt.com/project_crawler.php though I would strongly recommend against using it. Why? Well since writing this post I have discovered that Semalt may simply be using that form to collect a list of active webmasters to whom they will send further spam (pure speculation on my part, but check out the links below if you’re interested in reading more about this).

Semalt & Soundfrost caught spying
Semalt infecting computers to spam the web

Method 2: Adding .htaccess rules to block Semalt.
Here are a few lines of code that you can add to your .htaccess that will block anyone with the referrer of semalt.com from accessing your website (AKA the Semalt crawler):

# Semalt sometimes uses subdomains hence the crazy code
RewriteEngine on
Options +FollowSymLinks
RewriteCond %{HTTP_REFERER} ^([^.]+.)*?semalt.com [NC]
RewriteRule .* - [F]

If you’re unsure what a .htaccess file is, it’s literally just a file saved as .htaccess that’s uploaded to your websites root directory. Simply open notepad, paste in the above code, save it as .htaccess, upload it & wallah.

Method 3: Adding .htaccess rules to annoy Semalt. *preferred*
We could block Semalt from accessing our websites, but wouldn’t it be much better to just to send the bot back to where it came from? Hell yeah it would, and to do that all you need to do is use this code in your .htaccess file instead of the one above:

# Send that stupid Semalt crawler back where it came from
RewriteEngine On
Options +FollowSymLinks
RewriteCond %{HTTP_REFERER} ^([^.]+.)*?semalt.com [NC]
RewriteRule (.*) http://www.semalt.com [L]

Hey, with any luck they might even end up giving themselves a DDoS attack.

Method 4: Using PHP to send the crawler back where it came from.
Simply add this code to the top of your index.php:

$referrer = $_SERVER['HTTP_REFERER'];
if (preg_match("/semalt.com/",$referrer)) {
      header('Location: http://www.semalt.com');
}

Hopefully one of the above methods works for you & you manage to remove the Semalt mess from your website’s Analytics.

Update: After writing this post I also noticed spam coming from a domain named “kambasoft.com”. It appears that kambasoft & Semalt may be related, and the kambasoft spam (along with a few others) may be brought on by entering your domain into the “project crawler” removal page. You can read more on the kambasoft/Semalt relations here or alternatively used the updated code below to block them both.

# Block Semalt and kambasoft.com
RewriteEngine On
Options +FollowSymLinks
RewriteCond %{HTTP_REFERER} ^([^.]+.)*?semalt.com [NC, OR]
RewriteCond %{HTTP_REFERER} ^([^.]+.)*?kambasoft.com [NC]
RewriteRule .* - [F]

If you believe any of the Semalt or kambasoft URL’s may contain malicious software or redirect to websites that you do then you can report them here using Google’s Safe Browsing tool: https://www.google.com/safebrowsing/report_badware/

Before You Go: Click Here To See My Number #1 Recommendation For Making Money Online

I'm Dale Rodgers, a former electrician that discovered how to make a full time income online. I've put this blog together to share what I've learned so that I can help others do the same. Read more about me here.

8 Responses to "How To Block Semalt.com Referrer In Google Analytics"

Click Here to Leave a Comment Below

Leave a reply