Last Updated: October 11, 2023
· stffndtz

Prevent Chrome from searching when using Virtual Hosts

An issue i constantly run in to, so I'd like to share my knowledge with you.

So if you have configured you're Apache (in my case OSX 10.8) and try to set up local domains by adding entries to your


or wherever you may have stored it, and by redirecting by changing the


file, you might have noticed that Chrome doesn't give a damn, and will search for you something like "".

To prevent Chrome from going directly to the Google-Page, all you have to do is add two more entries to the hosts file.

For Example, if you have set up a Virtual Host named

go to your hosts file and instead of just using, paste the following

Magic! Hope this helps at least a few. Happy Coding!

Oh and hey, if you ever lose localhost somewhere along the way, try that in your hosts

::1  localhost
fe80::1%lo0  localhost


1 Response
Add your response

You can also just add http:// to your dev URL and the browser will bring you to the dev site. Then once it's done once you can just type after that

over 1 year ago ·