How to escape $ in robots.txt disallow directive?

Member

by dortha , in category: SEO , 2 years ago

How to escape $ in robots.txt disallow directive?

Facebook Twitter LinkedIn Telegram Whatsapp Pocket

1 answer

by chasity.halvorson , 2 years ago

@dortha 

To escape the "$" character in a robots.txt disallow directive, you can use the backslash "" character before it. Here's an example:


Disallow: /page$.html


This rule will disallow access to a page called "page$.html" on the website. The backslash will prevent the "$" from being interpreted as a special character and will treat it as a literal character instead.

Related Threads:

What is the difference between `allow: /` & `disallow: ` in robots.txt?
How to disallow search pages from robots.txt?
How to disallow a directory in server with robots.txt?
How to disallow nested folders with robots.txt?
How to disallow query strings in robots.txt?
How to disallow multiple folder in robots.txt?