Quick question for the robots.txt experts

2 replies
  • WEB DESIGN
  • |
Hey guys,

If I wanted to allow robots only to the index.html page on one of my sites (and disallow them to all the other pages on that site), then would I put the robots.txt file in the public_html directory and do this...

User-agent: *
Allow: /index.html
Disallow: /

Or would I put the robots.txt file *above* the public_html directory and do this...

User-agent: *
Allow: public_html/index.html
Disallow: public_html/
#experts #question #quick #robotstxt
  • Profile picture of the author iBBnet
    put it in your main directory, "public_html" -- that would be the same directory where your index.html page resides
    Signature
    Bryan
    After5PC.net
    Freelance Web Development
    and Graphic Design Services
    {{ DiscussionBoard.errors[1059042].message }}
    • Profile picture of the author Brandon Tanner
      Originally Posted by iBBnet View Post

      put it in your main directory, "public_html" -- that would be the same directory where your index.html page resides
      That would have been my first guess, but I wasn't entirely sure. Thanks for the clarification!
      Signature

      {{ DiscussionBoard.errors[1059279].message }}

Trending Topics