I'm in the process of implementing a search feature on my website and am wondering the best practises to do with the scope of a search. Currently, when viewing a certain section of the website search will be performed within that section. Meanwhile, searches started in other places (e.g. the homepage) will be global wide-scope searches. The issue is that the search bar is always in the same place (next to the logo) and I'm unsure whether it's confusing or not to have the search specifically scoped to the section the user is viewing.

The scope-limiting search certainly offers more in functionality, but I don't want to confuse users. Any advice would be appreciated.

3 Answers 3


You could always display a message before your scoped search results, with an option to expand the scope:

Searching in Section - Search the whole site instead

It really depends on the scale and scope of your site as to whether this is valuable. On Stack Exchange for example, our data is homogeneous, but if your site had distinct sections it could be very useful; say UX and Programming were different sections of one site. You could use the search field to only search the relevant section, and consider indicating by the searchbar what section you'll be searching

Search UX _________
Search Programming ______


I would suggest having just one search box, searching the whole website and breaking up the results as:

Results from this page / section:

  1. List item
  2. List item
  3. List item

Results from the rest of the website:

  1. List item
  2. List item
  3. List item

For searching a particular section only users could be asked to enter their queries as :

Sectionname: Searchterm


When the user wants to find something, they may or may not want to specify the location. Making them choose a location before they search may deviate from their task of finding something by unnecessarily adding a step.

On the other hand if someone wants to search in a particular location the above approach allows them to do so.


  1. If searching the whole site is going to take a long time (more than 1.5 seconds) then go with Ben Brocka's approach. You shouldn't make the user wait for something he/she doesn't care about.
  2. If it is not possible to let the user know about the sectionname: searchterm convention verbally or through the website design then a lot of users may never discover that method of searching.

As with everything else, how users perceive your website should dictate the solution.

Are users thinking of your site's sections as independent from each other (e.g UX stackechange and Stackoverflow) or as overlapping and not easily distinguishable (e.g Amazon's Music and MP3 departments)?

If they are independent, meaning - when the user is in one part, he doesn't want to see results from other parts - then go ahead and make separate search boxes. Just make sure to indicate with a label next to the search box which part of the site is searched. Ben Brocka's advice (offering an "all-site search" option in the results page) can come handy here as well.

If they are not independent, that means that the when users search, they expect to get results from the entire website. In that case, I suggest that instead of dividing the results by sections, just indicate for each result its source section, and sort the results by relevancy or recency (again, what gives the users better value). WSJ's search results page is a good example for that. They give under each result its source section.

Your Answer

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

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