How to search Google by specific URL?

condo1234 picture condo1234 · Oct 22, 2013 · Viewed 21.1k times · Source

I want to search for results from a specific site but only from a specific section of the site, I want to exclude results that have url segments, for example:

What I want to search for:

http://domain.com/productx

What I want to exclude

http://domain.com/productx/details/further

What query would I use in Google search to get the first results only above.

Answer

Devnook picture Devnook · Oct 29, 2013
site:domain.com/productx -domain.com/productx/details/further

Eg. search all stack overflow but not unanswered directory:

site:stackoverflow.com -stackoverflow.com/unanswered