How to block a specific folder in robots.txt file?

Discussion in 'robots.txt' started by gvinaykumar, Jul 17, 2014.

  1. #1
    Hi Webmasters,

    I’ve a doubt about robots.txt Disallow file.
    How to block a specific folder?
    Eg: URL: /ABC/xyz.html I want to block only /ABC/ folder not for xyz.html file which is part of ABC folder..

    I know this bellow method to block the specific folder and allow to release file.
    User-agent: *
    Disallow: /ABC/
    Allow: /ABC/myfile.html

    But I want to conform this method will work or not to block specific folder. (instead of add one more line in robots.txt file)
    User-agent: *
    Disallow: */folder/$

    Please share your voluble comments.

    Thanks In Advance,
    G Vinay Kumar (GVK)
     
    gvinaykumar, Jul 17, 2014 IP