3

We have many parameters in our URL and I wonder what will do the parameters pasted below. Will they disallow all the parameters after ?? Please tell me what does this mean:

Disallow: /?
Disallow: /*?*

What is the difference between them?

1 Answer 1

2

Instance 1

Disallow: /?

This will disallow any URL's where ? follows a /.

For example:-

http://www.example.net/?
http://www.example.net/page/?
http://www.example.net/page/sub/?
http://www.example.net/page/sub/?89y398th03th

Instance 2

Disallow: */?

This will disallow any URL's where ? exists in the URL after a /:-

http://www.example.net/?
http://www.example.net/page/?
http://www.example.net/page/sub/?
http://www.example.net/page/sub/?89y398th03th
http://www.example.net/search?q=url
http://www.example.net/type?paramater=query

You would benefit from reading the robotstxt documentation where all of this is explained.

1
  • 3
    Disallow: /? will only disallow URLs in the root of the site (prefix matching). ie. example.net/?something, but not http://www.example.net/page/? (you would need a pattern like */? for that to work). (The * at the end of the pattern in /*?* is also superfluous.)
    – MrWhite
    Commented Apr 13, 2015 at 10:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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