How to escape $ in robots.txt disallow directive?

Member

by dortha , in category: SEO , 4 months ago

How to escape $ in robots.txt disallow directive?

Facebook Twitter LinkedIn Telegram Whatsapp Pocket

1 answer

by chasity.halvorson , 4 months 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.