Last week a friend wrote to me with a great question. He wrote:
What's weird is that the results STILL include items from Closure-library.googlecode.com
Doesn't my minus sign in front of the site: prevent this from happening?
I had to stop and think about this for a minute. Why WAS he getting results from Closure-library.googlecode.com?
Why? Because site: only works on top-level domains. To make this particular example work, you have to fully specify the domain. That is, you'd have to write: -site:closure-library.googlecode.com as in the example below.
Versions of site: that work properly are...
site:.gov -- searches all .GOV sites
site:searchresearch1.blogspot.com inurl:2010 -- searches my blog with 2010 in the URL
site:www.nasa.gov/multimedia -- search all of NASA.gov/multimedia
site:www.google.co.za news -- search all of Google South Africa for News
And of course, putting a minus-sign in front of any of these will AVOID those resources.
But you can't just put the leading part of a website's name into the site: operator and hope for it to work. It has to be able to expand to a full website name!
Hope this pro-tip helps some of you!