Archive
This post is archived and may contain outdated information. It has been set to 'noindex' and should stop showing up in search results.
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:
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)
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)