Sanjoy Roy

[MCM, MCP, SCJP] – Senior PHP Programmer

Tag Archives: robots.txt

Block Google and bots using htaccess and robots.txt


Robots.txt
User-agent: *
Disallow: /

.htaccess

RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} AltaVista [OR]
RewriteCond %{HTTP_USER_AGENT} Googlebot [OR]
RewriteCond %{HTTP_USER_AGENT} msnbot [OR]
RewriteCond %{HTTP_USER_AGENT} Slurp
RewriteRule ^.*$ “http\:\/\/domainname\.com.au” [R=301,L]

%d bloggers like this: