1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Help! I want a robots.txt allow only root and disallow all others

Discussion in 'robots.txt' started by DoDo Me, Aug 30, 2010.

  1. #1
    Hi there,

    I have a site http://sample.com/
    I want http://sample.com/ be clawed and nothing else be clawed.

    So if I disallow all other, should be:
    disallow: /
    but if I want to allow root. then should be:
    allow: /

    I know it will not work. So, if you know how, please tell me. thanks
     
    DoDo Me, Aug 30, 2010 IP
  2. manish.chauhan

    manish.chauhan Well-Known Member

    Messages:
    1,682
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    110
    #2
    You can use following code:

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

    This code will block your whole website except the index page of your website that is your home page eventually.
     
    manish.chauhan, Aug 30, 2010 IP
  3. DoDo Me

    DoDo Me Peon

    Messages:
    2,257
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thank you for your advice, the problem is no index.whatever , just root :(
     
    DoDo Me, Aug 30, 2010 IP
  4. w47w47

    w47w47 Peon

    Messages:
    255
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    i have the same problem...

    also mydomain.com/index.php is not the same as mydomain.com/
     
    w47w47, Dec 20, 2010 IP
  5. techvivek

    techvivek Peon

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    allow only root directory and assign disallow to all the files in your site. in this way you can easily do it.
     
    techvivek, Dec 31, 2010 IP