Forum Moderators: phranque

Message Too Old, No Replies

.htaccess and google

how to keep google away.

         

rominosj

5:33 pm on Jun 28, 2004 (gmt 0)

10+ Year Member



Hi,

How can I keep Google away from my site using .htaccess?

Only google not yahoo nor msn.

Thanks,

Romino

quarantine

5:36 pm on Jun 28, 2004 (gmt 0)

10+ Year Member



don't know about .htaccess but how about a robots.txt?

User-agent: Googlebot
Disallow: /

rominosj

8:02 pm on Jun 28, 2004 (gmt 0)

10+ Year Member



I am using the robots.txt, but googlebot is still indexing a folder accessed thru password, and I just dont wan't google in my site any more.

thanks anyway.

Romino

jdMorgan

8:38 pm on Jun 28, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



First, validate your robots.txt [searchengineworld.com], and then make sure that your password-protection cannot be bypassed because of some accidentally-misconfigured alias or symlink - There's no reason Gbot should be indexing a password-protected area.

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} Googlebot
RewriteRule your_passworded_directory_name - [F]

Refs:
Apache mod_rewrite documentation [httpd.apache.org]
Apache URL Rewriting Guide [httpd.apache.org]
Regular Expressions Tutorial [etext.lib.virginia.edu]

Jim