Results 1 to 6 of 6
  1. #1
    Doolally's Avatar
    Doolally is offline Private Member
    Join Date
    February 2003
    Location
    Scotland
    Posts
    4,584
    Thanks
    501
    Thanked 732 Times in 572 Posts

    Default Robots.txt Question

    I probably should know this but having a brain drain today.

    My robots.txt file currently looks like this:

    User-Agent: *
    Allow: /


    Now I want to disallow one directory on the server. Does the code now look like :

    User-Agent: *
    Allow: /

    User-agent: *
    Disallow: /go/


    or should it look like this:

    User-Agent: *
    Allow: /
    Disallow: /go/

  2. #2
    Chips's Avatar
    Chips is offline Private Member
    Join Date
    October 2007
    Location
    God's Country
    Posts
    3,618
    Thanks
    1,040
    Thanked 1,202 Times in 886 Posts

    Default

    Quote Originally Posted by Doolally View Post
    or should it look like this:

    User-Agent: *
    Allow: /
    Disallow: /go/
    The 2nd one is the winner. You can also test it in big G's webmaster tools, there is a handy app to see if it is written correctly.
    --
    "People who are unable to motivate themselves must be content with mediocrity." ~Andrew Carnegie~

  3. The Following User Says Thank You to Chips For This Useful Post:

    Doolally (7 April 2012)

  4. #3
    Doolally's Avatar
    Doolally is offline Private Member
    Join Date
    February 2003
    Location
    Scotland
    Posts
    4,584
    Thanks
    501
    Thanked 732 Times in 572 Posts

    Default

    Thanks Chips!

  5. #4
    michael1981 is offline Public Member
    Join Date
    April 2011
    Location
    Australia
    Posts
    321
    Thanks
    16
    Thanked 60 Times in 48 Posts

    Default

    You should also include a link to your sitemap in the robots.txt file. It will help with faster indexing of new and old pages.

    Sitemap: http://www.yourwebsite.com

  6. The Following User Says Thank You to michael1981 For This Useful Post:

    Doolally (8 April 2012)

  7. #5
    bboyspyder's Avatar
    bboyspyder is offline Private Member
    Join Date
    March 2012
    Posts
    224
    Thanks
    2
    Thanked 48 Times in 32 Posts

    Default

    If you use Wordpress you can get the free plugin PC robots.txt

    Very handy for fast editing your robots.txt and has included some options already.
    Best backgammon sites at OnlineBackgammon.Org.Uk

  8. The Following User Says Thank You to bboyspyder For This Useful Post:

    Doolally (8 April 2012)

  9. #6
    Doolally's Avatar
    Doolally is offline Private Member
    Join Date
    February 2003
    Location
    Scotland
    Posts
    4,584
    Thanks
    501
    Thanked 732 Times in 572 Posts

    Default

    Thanks Guys!

    Nice tip Michael. I wasn't aware you could link to your sitemap from Robots.txt.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •