How to block Alexa Toolbar users?

Any ideas how I can block Alexa Toolbar users? I don’t want to appear in the ranking while we are in beta ...

I see you can block your search engine with

User-agent: ia_archiver Disallow: / 

but I can’t find any documentation on how to get myself out of the ranking itself. I read before when someone tried to email them and they swore. So I guess I have to block them?

Any better ideas or ideas on how to block their access?

+4
source share
2 answers

For those who found this post later, I developed my own solution. It seems that when the alex toolbar is installed, it appears in the user agent.

 <?php echo $_SERVER['HTTP_USER_AGENT']; ?> 

You can redirect these users with php

 preg_match('/(Alexa)/i',$_SERVER['HTTP_USER_AGENT'])?header('Location: http://alexausersgohere.com'):null; 

You can also just redirect them by dropping this into your .htaccess file.

 Options +FollowSymlinks RewriteEngine On RewriteBase / RewriteEngine on RewriteCond %{HTTP_USER_AGENT} ^Alexa RewriteRule ^(.*)$ alexausersgohere.com#$1 [R=301,L] 

Make sure you double check this htaccess code, I just wrote it as a demo, didn't test it, I used php.

+6
source

What do you think will be done to block? By the time your web server sees the request, the browser (explicitly) sent the request and the toolbar (may have) watched and recorded the request. The answer you send back cannot cancel this.

-2
source

All Articles