tags:

views:

40

answers:

1

I want my robot.txt to allow indexing of only my index file in google. How does this look? Will the following do the trick?

User-agent: Google
Disallow: /_/
Disallow: /library/
Disallow: /media/
Disallow: /www/

User-agent: *
Disallow: /
A: 

Try this

    User-agent: Google
    Disallow: /
    Allow: /index.php
    Allow: /$ #this will allow your homepage as well**

**but its better to use htaccess redirect , to redirect example.com to example.com/index.php. To avoid duplication of url.

JapanPro
What about denying all the other robots except google?
Wilson
Also, will google index http://example.com/ or http://example.com/index.php or both?
Wilson
it will work only for index.php witch is best practice , coz you are avoiding duplication. check the edited one now
JapanPro