Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have custom domains set up for internal web site testing in my /etc/hosts file.

I try to access them in Chrome, and I get routed to a Google search instead. But when I ping the domains, they show that they are working.

What should I do to make sure I can access these sites in Chrome?

share|improve this question

You can just throw an http:// in front of your local address; that worked for me.

share|improve this answer
This should do it. By declaring the http:// protocol up front Chrome should assume you know what you're doing and just try the address as given instead of trying to be helpful. – BowlesCR Jan 29 '14 at 18:22
Doesn't worked for me. The Chome just writes «Couldn't retrieve URL», although plain ping there works like a charm. – Hi-Angel Sep 30 '14 at 12:26

Disable "Use a web service to help resolve navigation errors" in Chrome's Settings under Privacy. Try flushing Chrome's cache after disabling this and see if it works then.

share|improve this answer
This is a less-optimal way of solving it. Without http:// in front of the domain, Chrome may assume that you've made a "navigation error" / lazy search. With http:// it shouldn't argue. – BowlesCR Jan 29 '14 at 18:20

As the answer in stackoverflow, the solution for me was adding ::1 in /etc/hosts like: foo.domain.local
::1 foo.domain.local
share|improve this answer
This really shouldn't affect the situation unless you're trying to override the domain name of a real site that happens to be IPv6 enabled and point it back to your local machine. – BowlesCR Jan 29 '14 at 18:21

just use the domains like so .

It's the "/" at the end to resolve the host...

share|improve this answer

In /etc/hosts list them like this: foo.localdomain

Now when you type foo.domain in the address bar it will still return search results but you should see a bar asking you if you meant to go to foo.localdomain instead.

Strangely once I had got Chrome to do this once it started doing it for single host names in /etc/hosts but I had to use the host.domain form first.

share|improve this answer
I don't even get that bar. It's a fully-qualified domain name too. – psion Aug 17 '12 at 3:43

You must log in to answer this question.

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