views:

39

answers:

2

In only one search engine I want to get...

http://mysite.com/
indexed, not...

http://mysite.com/index.php
I only want to allow indexing of the main page of the website, and nothing more. I do not want the bot to follow any of the links on the main page.

My meta tags include the following::

<meta name="robots" content="index, nofollow" />

My robot.txt includes the following::

User-agent: Googlebot
Allow: /index.php
Disallow: /

User-agent: *
Disallow: /

Will this achieve my desired result?

Thanks in advance!

+1  A: 
RewriteCond %{HTTP_HOST}   !^www\.example\.com [NC]
RewriteCond %{HTTP_HOST}   !^$
RewriteRule ^/(.*)         http://www.example.com/$1 [L,R=301]

Put this in .htaccess.

This is straight from Apache's URL Rewriting Guide

tilman
+1  A: 

Specify your canonical:

From http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html

<link rel="canonical" href="http://www.mysite.com/" />

in your <head>

Andrew67