: How to disallow hash fragments in robots.txt file I have a similar URL in my website that I want to stop all robots from crawling /review/dir/dir/dir/dir/#review-form The rules I've tried are:
I have a similar URL in my website that I want to stop all robots from crawling /review/dir/dir/dir/dir/#review-form
The rules I've tried are:
Disallow:/review/*review-form$
Disallow:/*#review-form$
Disallow:review-form$
Disallow:/#review-form
The bottom rule works but also blocks the URL without the hash fragment because the # symbol starts a comment.
How can I disallow a URL that has a hash fragment in the robots.txt file?
More posts by @Candy875
1 Comments
Sorted by latest first Latest Oldest Best
SOURCE
Comments can be included at any location in the file using the "#" character.
You should be able to get around the issue by using URL Encoding and using the code %23, like so:
Disallow: /%23your-url/
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.