Sunday, March 7, 2010

How to block crawlers on SSL site?

If you are using apache create a file called
robots_ssl.txt
and add this code:
User-agent: *
Disallow: /

Then add this to your .htaccess
Options +FollowSymLinks -MultiViews
RewriteEngine on
RewriteCond %{SERVER_PORT} ^443$
RewriteRule ^robots.txt$ robots_ssl.txt

and you are done.

No comments:

Post a Comment