27

Everytime I have to search something on stackoverflow.com using Google I have to type the rather long

<search term> site:stackoverflow.com

Is there some way to speedup the process, so that I need not type the whole 23 characters of site:stackoverflow.com each and every time?

I am using Google Chrome.

7
  • website questions are offtopic on Super User. questions about the Stack Overflow trilogy should be asked on Meta Stack Overflow. this will be migrated there shortly. May 9, 2010 at 3:20
  • 6
    @quack: this belonged on super user. He asked about stackoverflow.com, but he could have asked the same question about microsoft.com or any other website. Just because the example mentions stack overflow it doesn't mean it belongs on meta. PS: also this isn't a "website question", it's a question about google chrome =o May 29, 2010 at 13:21
  • 1
    @kop: there are several threads here on Meta about using Greasemonkey or other addons. you're right that this question is about using Google Chrome, but it's also Stack-Overflow-specific. i think it's better here on Meta than on Super User. May 29, 2010 at 23:31
  • Err, make a form that does it for you?
    – user50049
    Jun 30, 2010 at 17:58
  • @Tim Post: what form?
    – Lazer
    Jul 5, 2010 at 5:45
  • Related: How does Chrome know how to search Meta?
    – Pops
    Feb 9, 2011 at 16:31
  • sitecomber.com/cu/StackOverflowq9zcom
    – user267043
    Aug 5, 2014 at 23:17

8 Answers 8

32

Right click on the url bar. Set up search providers. Add a new one.
Name: Superuser
Keyword: su
url: http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=%s site:superuser.com

Hope this is what you meant.

6
  • 3
    To use the search above, type su into the omnibar (URL bar) and hit the TAB key. After that just type your query and hit ENTER.
    – Trey
    May 8, 2010 at 19:33
  • @Fujishiro: thanks! exactly what I wanted!
    – Lazer
    May 8, 2010 at 19:37
  • +1 for the "Edit Search Engines..." shortcut menu in the URL bar's context menu.
    – alxndr
    Jan 17, 2014 at 5:19
  • If you're pretty sure you'll want the first result from Google's search, add &btnI to the end of the URL, which will flip on the "I Feel Lucky" behavior to take you straight to the first result.
    – alxndr
    Jan 17, 2014 at 5:19
  • They should call that "russian roulette". One year ago there were still poisoned searches out there. (Like searching for a safe term and clicking on an image got you to some weird site.)
    – Apache
    Jan 17, 2014 at 10:08
  • How to add search provider? I can't see this option
    – Rans
    Mar 27, 2021 at 12:34
5

Why would you do that? Stackoverflow.com has its own search and search plugin. I'm using Chrome, too, which picks up search plugins when it finds them. So, if you visit stackoverflow.com relatively often, you can start typing it (for me it's enough to type "sta") in the address bar and you'll see at the right of it "Press <Tab> to search Stack Overflow". Press tab, enter your query and press enter.

3
  • That is amazing, you have made my day.
    – Bringer128
    Nov 9, 2011 at 8:14
  • 7
    Because google search is a lot better than SE search...
    – user173320
    Jun 27, 2012 at 8:26
  • Custom shortcuts for a few common searches can speed up your navigaton a lot. Wikipedia/image/map search and translate are the ones I use daily; documentation sites can be nice too.
    – alxndr
    Jan 17, 2014 at 5:25
2

Use DuckDuckGo. Syntax:

!so %s => http://stackoverflow.com/search?q=%s
!su %s => http://superuser.com/search?q=%s
!sf %s => http://serverfault.com/search?q=%s

Coming soon I've suggested a bang on these.

!mso %s => http://meta.stackoverflow.com/search?q=%s
1

Try adding an as_sitesearch URL argument. For example:

http://www.google.com/search?as_q=YOURQUERY&as_sitesearch=stackoverflow.com

This form should work as well:

<form method="GET" action="http://www.google.com/search">
<input type="hidden" name="as_sitesearch" value="stackoverflow.com">
<input name="as_q">
<input type="submit" value="Search StackOverrflow">
</form>

If you simply want to add a search engine to Google Chrome, Fujishiro's answer is what you are looking for. You can replace YOURQUERY in the URL above with %s when editing your Google Chrome search engines.

6
  • I didn't get how the form worked. I though Google had a framework of their own and didn't use PHP. How does GET work then? How does the form return results? Sep 11, 2012 at 14:48
  • @YatharthROCK The HTML snippet I listed is not related to PHP. A form in HTML is a tool for performing an HTTP GET or POST request with GET parameters or form-encoded POST data. You should look up HTML forms and HTTP methods. Here's one link that may shed some light on the issue for you: cs.tut.fi/~jkorpela/forms/methods.html Sep 13, 2012 at 16:01
  • I will, thanks for clearing that up. BTW, can you tell me what's the difference between http://www.google.com and http://google.com? From what I know, the 'things' before the domain tell the name of the dedicated server (like plus.google.com has a dedicated server just for that). plus.google.com would also be the same as google.com/plus. The www. is just some placeholder that tells the browser explicitly to go to the 'main' server. Sep 14, 2012 at 14:05
  • Do correct me where-ever I'm wrong (probably everywhere) Sep 14, 2012 at 14:06
  • Those "things" are part of the domain (a subdomain within it) which is a hierarchical structure. Domains are linked to IP addresses via domain name system (DNS). Multiple domains can point to the same IP and web servers located behind that IP can route traffic accordingly based on the domain given. I would look up how domain name servers work. Unfortunately I don't have a great suggestion for a single resource that might teach all of this information. I hope you can find one that works for you. Sep 15, 2012 at 21:27
  • That makes sense, thanks for clearing it up. Sep 16, 2012 at 11:50
1

If you are using Firefox, this will be helpful:

https://addons.mozilla.org/en-us/firefox/addon/google-stackoverflow/

0

Some have created a custom Google search for that:

0

I find adding the keyword 'stackoverflow' to my google search works almost as well as restricting the results to the site and saves me a good 9 characters of typing.

<search term> stackoverflow

is usually as good as

<search term> site:stackoverflow.com
1
  • When searching for duplicates I don't want anyone referring to SOFU to clutter my search results. Using site: excludes all irrelevant sites
    – Ivo Flipse
    Jun 30, 2010 at 18:09
0

I would recommend you an extension SO Search Extension

You just type in the address bar "so your_search_term" and here you are :)

3
  • No need to "bloat" your chrome with more extensions... You can manually setup custom search engines in chrome...
    – Lix
    Jun 27, 2012 at 8:26
  • @Lix, cool. I didn't know about this feature. I assume it didn't exist when that extension was written. And more than that - adding an extension is a bit easier than creating own search query in the browser settings.
    – unorsk
    Jun 27, 2012 at 9:12
  • 1
    Easier - yes, but each extension that you add to chrome makes it eat more and more resources... If there is an alternative method such as a userscript, it is preferred over an extension...
    – Lix
    Jun 27, 2012 at 9:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .