4

I would like to allow a path and disallow everything else in the directory.

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

Will this work? If not what would be a better way of doing this?

4

I actually found this helpful.

https://moz.com/community/q/robots-txt-how-to-exclude-sub-directories-correctly

User-Agent: *
allow: /example/$
disallow: /example/*

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.