I have a local Apache server running, which is defined through /etc/hosts as "apache". So I often open pages like:

http://apache/website/

Normally, this works fine. However, since I am using a more recent Chrome browser, at odd moments the browser decides that the URL I type is not a URL but actually a search, so it loads my default search engine and tries to find this URL. It often, but not always, shows a link under the address bar that says Did you mean to go to http://apache/website?. That is nice, but very annoying having to click here instead of going there directly. What makes Chrome behave this way? Can I fix this?

10 Answers 10

I had the same problem and i found that typing the / at the end will always treat it as a url instead of keyword.

For example in my case :

local.dev/ben is treated as search

but

local.dev/ben/ its working fine
  • 2
    Saying that appending a / at the end will always treat it as a url instead of a keyword does not always hold true, for example scoped link local addresses will trigger a search even if a / is present: https://[fe80::1%eth0]/ – Tiernan Sep 26 '13 at 8:59
  • 2
    Does not work for my improved nodejs server http://0.0.0.0:8080/bla/ Does not work! – hitautodestruct May 25 '15 at 14:52
  • 2
    @hitautodestruct 0.0.0.0 is not a valid ip address, it's a placeholder address that generally means default route in routing, or all ipv4 addresses on the host for services. You would need to reach it via a valid ip address assigned to your host. – Steve Buzonas Jan 16 '17 at 20:53

You can implicitly do this by creating a new search engine with a URL of http://%s and keyword of null. Then, set this as the default search engine.

To get to the search engines page in chrome:

  • Open Settings panel.
  • Click Manage search engines... button under Search heading.
  • Search Engines pane has two sections: Default search engines and Other search engines
  • At the bottom of the Other search engines section, you'll see a form which we'll make use to add a new search engine.

Search Engines

  • 2
    That's a neat trick. I'll have to try it out! – afrazier Nov 6 '11 at 1:27
  • 3
    @iglvzx Thanks, but this only works if I always want to open any keyword this way. I really like to keep using Google Search when typing other words, but I just don't want this to happen when I am typing a localhost URL. – user95156 Dec 28 '11 at 22:02
  • 1
    It's no longer possible to set 'null' as keyword as of Chrome v26. – skolima Apr 8 '13 at 13:20
  • 1
    @skolima It's possible in v27.0 – svandragt May 14 '13 at 10:03
  • 1
    @svandragt: v27 is now stable and unfortunately this is still disabled. Crap. – skolima May 22 '13 at 9:58

I got annoyed by this as well. I recently found out what caused it. Try disabling 'Use a web service to help resolve navigation errors'.

  • 3
    This does not work if I then add to the URL. e.g. I load local.symphony-2.3 and then add /symphony or /symphony/ to the URL, chrome searches google for that phrase. – codecowboy Apr 20 '12 at 7:50
  • This works perfectly for me, thanks! – Nik Jun 18 '14 at 10:44
  • 1
    In Chrome 54 this is in "Show Advanced Settings" on the bottom of about://settings page. – DanFromGermany Nov 23 '16 at 9:00

If you know the port you're using, you can specify it by hand like

url:80/index.html

instead of

url/index.html

In the first case, it won't be treated as a search request

Here's how to disable the ability to make searches from the address bar (omnibox) of Google Chrome:

  1. Open Google Chrome.
  2. Type chrome://flags in the address bar and press Enter.
  3. Scroll to Enable search button in Omnibox.
  4. Select Disabled.
  • 1
    I don't have this option; what version are you using? – Ben N Feb 2 '16 at 1:13

In latest chrome settings - Advanced settings

enter image description here

  • Thanks, that is the only sane solution – BillyTom Sep 20 at 12:06

I had to add google.co.in with the search string: http://google.com/search?q=%s to get both Google Search and URL search working.

Now if I want to browse URL I can just append 'http://whatever' and choose if i want to do a URL navigation or search.

@iglvzx's answer no longer seems to work in version 40 of Chrome. It looks like Null is not a valid entry anymore. I had to improvise as above to get this working.

  • Hmm not working for me on Chrome 40. What an odd bug. – jfroom Jan 28 '15 at 20:47

I had the same issue with Chrome on my Android phone. I resolved it similar to @Rik suggestion.

For mobile Chrome:

  1. Go to Settings -> Privacy
  2. Untick Navigation error suggestions
  • i had to untick "navigation error suggestions" and "search and site suggestions" (the first two options) before chrome stopped turning my urls to search queries. afterwards i could enable both settings and chrome still opened my urls as it should. bad chrome. bad propietary black box chrome. i am using firefox kthxbye – lesmana Apr 30 at 12:20

I've found that in Linux Debian on Chrome Version 69.0.3497.100 (Official Build) (64-bit) the opposite of chifliiiii's answer is true (no trailing slash avoids a search), but adding a hash after the url works nicely.

So http://project.local/dir/#foo or simply http://project.local/dir do the trick.

It is really annoying, chrome everytime cuts off protocol and everytime suggests as file://. Try add right url to Bookmarks. Then Chrome will show on the first place right address (marked with star).

chrome omnibox

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.