I go to the address bar and type, oh let’s say, “straightdope”.
Expected & appropriate behavior: browser converts that to “http://www.straightdope.com” and attempts to load that page.
Annoying behavior I keep running into on other folks’ computers, both Mac and PC: browser goes to some freaking search engine like Google or Yahoo or Bing and brings up all hits for “straightdope” instead.
Note that I do know the difference between an address bar and a search-widget searchstring field.
[BBQ Pit]Who the hell thought this was a good idea?[/Pit]
Depends on the browser. I use Chrome; that feature is called “Chrome Instant”. By default it’s disabled; I keep it that way. In Firefox under Windows, it’s under Advanced -> Options, the box marked “Search for text when I start typing” is where to do it, it’s also unchecked by default.
In current versions of Internet Explorer, it’s Tools -> Internet Options -> General, and click Settings for “Change search defaults”. Then, under Search Providers, change the “Search suggestions” setting for each provider as required. Some (Microsoft’s Live, at least) may be enabled by default.
I don’t have a Mac handy (have one at the office) but I’m sure there is similar control over that behavior.
Safari on OS X doesn’t do this. It submits the URL exactly as typed.
However, this behavior is DNS-dependent. Some DNS’s will assume you mean to add the http://www. at the beginning and the .com at the end, some don’t, and some take you to a search engine.
Hmm… I’m going to try to clear up some of the confusion I see in this thread:
[ol]
[li]Integrating search into URL bars has indeed been around for a few years. Most browsers default to it now, but you can usually disable the behavior in their options or about:config screens.[/li]
[li]Typing “straightdope” into the address bar only works because your browser is secretly going behind the scenes to Google (usually) or Bing and taking you to the top result returned. This is a NOT an Internet standard but a convenience feature that browsers added. This is one possible behavior (out of several) for integrated searches; some browsers are set to display the full list of results (which is what you saw) or to simply give you an error page (what browsers did in the old days).[/li]
[li]In Chrome, the all-in-one address bar is called the Omnibar and in Firefox 3 it’s called the Awesome Bar. Chrome Instant is something entirely different; it loads webpages while you’re still typing the URL (like www.fac might pop up Facebook). Firefox’s “Search for text when I start typing” is also something different; that feature lets you search for text WITHIN a web page by typing it directly instead of first pushing CTRL-F. Internet Explorer’s Search Suggestions is not the right thing either; that determines whether IE will suggest “Facebook” when you type “Face”, but does not control whether searches are performed from the address bar in the first place.[/li]
The correct procedures:
[list=a]
[li]In Firefox 3, type in “about:config” in the Awesome Bar. Filter it down to “keyword.url” and change the current value to “Google Doodles”[/li]
[li]In Chrome, right-click on the Omnibar and choose Edit Search Engines. Scroll to the very bottom of the list and add a new search engine. Name it anything you like and it assign it any keyword you’d like; the important part is where it says “URL with %s is place of query”; for that, enter “http://www.google.com/search?btnI=Im+Feeling+Lucky&q=%s”. Push enter to save it and then hover your mouse over the entry you just created and make it the default. Note that this will also affect explicit searches from the address bar (meaning even if you add a ? to the start of your query – another Chrome feature – it won’t return the full list anymore). You can still perform searches from Google.com manually.[/li]
[li]In Internet Explorer 8, go to Tools -> Options -> Advanced -> Search from the Address Bar. Choose “Go directly to the first result” if that option is available.[/li]
If not, choose “Just display the results in the main window.” Then navigate to http://www.ieaddons.com/en/createsearch.aspx
For the URL field on this page, type in “Redirect Notice”
Name it “Lucky” or some another single word. Click “Install Search Provider” and make it default.
[/ol]
[li]DNS isn’t usually responsible for this. The exceptions are when:[/li]
[list=a]
[li] A website or its host has configured separate DNS entries for both www.whatever.com and whatever.com and either redirected both to the same place or one to the other[/li]
or
[li] An ISP tries to make money by forcing advertisement-supported fake error pages to its customers.[/li]
[/list]
[li]To summarize the above, most browsers these days go through a thinking process like this:[/li][list=a]
[li]You type in “straightdope”[/li]
[li]Your browser tries to resolve that via DNS, but it’s not valid. At this point, if your ISP is cheap and annoying, you’ll get their results page because they basically lie to your browser and tell it that the page exists (even though it actually doesn’t and you’ll just get back their ad-supported search results). If your ISP isn’t that evil, proceed to the next step.[/li]
[li]Depending on your browser, it will first try to see if it’s an obvious typo (straightdope.cmo instead of straightdope.com). Then, it may try to see if “straightdope” is searched commonly enough that people likely meant one specific site (i.e., straightdope.com). If it is, it’ll take you there. If not, it’ll return a list of results. Of course, you can change this behavior to force it to always go to the first result by following the instructions in #3, above.[/li][/list]
[/list]
Reply, a couple of comments on your post:
The instructions in #3 would only do what the OP wants if the first google result for “straightdope” was straightdope.com. If the first google result for “straightdope” was “ceciladams.com” then your instructions would bring you to “ceciladams.com”. Right?
To prevent the problem of the “cheap and annoying” ISP who gives you a results page when you type in an invalid address, you can use some public DNS service, such as Google Public DNS.
In my experience, this actually works out better than automatically attaching .com to what you type (which is what Markxxx’s CTRL-ENTER tip does) because some popular phrases don’t actually live at the associated .com or lost battles to domain squatters. Examples: ipad, white house, university websites, government websites (dmv, usda) firefox (for a few years), chrome, etc. Google, for the most part, is much better at finding things than a human trying to guess domain names.
Typing “straightdope” and landing on “http://www.straightdope.com” was a behavior ingrained in me long before there was a Google or even an Alta Vista. (I guess there was a Yahoo though). I was doing it in Netscape Navigator 2.0 under Macintosh System 7.6. (Well, there wasn’t a www.straightdope.com back then either but presumably you know what I mean).
I seem to dimly recall that if the actual URL was oh let’s say “http://www.eckerd.edu” and you typed in “eckerd” you’d get a page not found error message because the browser would assume “http://www.eckerd.com”. So I thought it was just a simple browser trick. (Even earlier browsers I used, like Mosaic, didn’t do this, you had to type out the entire freaking URL for anything & everything). So you folks are saying that all modern browsers are doing a searchengine search behind the scenes and not a simple textstring substitution any more?
I just downloaded Navigator 2.02 (what a blast from the past…) and it does indeed automatically try the .com if plain “straightdope” doesn’t work.
But yeah, I think many (most?) browsers these days do an automatic search instead. Try typing in “ipad” in the address bar and see if it takes you to Apple’s page (via a search engine) or ipad.com (via a simple .com append).
Firefox has two features that are somewhat muddled in the discussion above. “Internet Keyword Search” converts URLs into search queries if they are not found, etc. It can be turned off. If it disabled, then firefox defaults to an older feature, “URL autocomplete,” which does things like adding “.com” to incomplete URLs (without performing a search). It can be turned off, too. Details: Search the web from the address bar | Firefox Help