Will this work in robots.txt?

Discussion in 'robots.txt' started by Small Fry, Jul 20, 2008.

  1. #1
    My aim is to block all of the gallery except from the d sub folder. Will this work to achieve this? Thankyou for your help.


    User-agent: *
    Disallow: /gallery/

    User-agent: *
    Allow: /gallery/d/
     
    Small Fry, Jul 20, 2008 IP
  2. pr0t0n

    pr0t0n Well-Known Member

    Messages:
    243
    Likes Received:
    10
    Best Answers:
    10
    Trophy Points:
    128
    #2
    That should work. You can even remove that one extra line, so it looks like this:

    
    User-agent: *
    Disallow: /gallery/
    Allow: /gallery/d/
    
    Code (markup):
     
    pr0t0n, Jul 22, 2008 IP
  3. internetsuser27

    internetsuser27 Peon

    Messages:
    113
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks Pr0t0n. I was wondering how to do this from subdomain perspective. My buddy owns a domain and gave me a subdomain to use for it. Is this the best way to set up robots blocking the site and allowing the subdomain as well? Thanks.
     
    internetsuser27, Jul 24, 2008 IP
  4. Ranjan Padhi

    Ranjan Padhi Peon

    Messages:
    55
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    User-agent: *
    Disallow: /gallery/
    Allow: /gallery/d/

    yes this will work correctly
     
    Ranjan Padhi, Jul 25, 2008 IP
  5. udayns

    udayns Peon

    Messages:
    237
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    sure this code is 100% correct and it will be work.
     
    udayns, Aug 11, 2008 IP
  6. seoorganizers

    seoorganizers Peon

    Messages:
    111
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    you have written the code differently, instead of writing once.

    you can check the syntax's in many SEO forums even at dp
     
    seoorganizers, Aug 13, 2008 IP
  7. catanich

    catanich Peon

    Messages:
    1,921
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    0
    #7
    One change I would make is in the order of the commands. I think the order is important.

    User-agent: *
    Allow: /gallery/d/
    Disallow: /gallery/
     
    catanich, Aug 21, 2008 IP