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.

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..
    SEMrush
    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
    SEMrush