Archive
This post is archived and may contain outdated information. It has been set to 'noindex' and should stop showing up in search results.
Google Chrome Omnibox Conflict With VirtualHosts & Search
Dec 2, 2011Web and InternetComments (1)
Google Chrome's Omnibox knows what you're looking for. If you type in a regular-looking web address, such as google.com, it knows to take you to that website. If you just type in pizza, it knows that you want to search for pizza and will take you to search results.

But what if you have a term, such as pizza, defined as a host that points to a virtual host in your web development environment? Instead of taking you to the corresponding site, Chrome still takes you to the search results, along with a little pop-down box that looks something like:

Did you mean to go to http://pizza/?
Sure, if you had just typed http://pizza/ in the first place, Chrome would treat it as an address. But why should you have to do that? If the host exists in the hosts file, Chrome's default behavior should be to treat it as an address and not a search query.

Let's take a better example. I use h3xed as the host name for the virtual host I run for this site on my development computer. Yet, if I type in h3xed into Chrome, it still takes me to search results. Chances are, if you have a term defined in your hosts file and you type it in, you are wanting to treat it as an address and not a search query. And if you do want to search for it, you can always put a question mark ahead of it (use Ctrl-k or Ctrl-e). Chrome should at the very least give you the option to make it behave this way, but there are no options that I've found in settings or any of the pages in chrome://about/.

So, if you want to bypass the "Did you mean to go to" message, you must type http:// in front of your host, or sometimes you can get away with just putting a trailing / after it (EX: h3xed/).

Perhaps someone knows of a tweak for this? (not including disabling the search entirely, which does work but then you can't search using a question mark)
Comments (1)
Add a Comment


Please review the commenting policy prior to commenting.
Keshav Maheshwari   Oct 19, 2013
In above context, what i want to do is to share any folder with my friends on intranet, so i created local server on my machine using python, now to access this they need to pit MY_IP:PORT_no in URL. For this procedure to be simpler i use my roll no as port no and i want my name to be used in url instead of MY_IP. So i edit hosts file and wrote down MY_NAME corresponding to MY_IP. But still i am not able to use it . It is same problem u mentioned above and is not resolving in the way u suggested. Check out , if u can help with this ?