1

When I am typing localhost in my browser it is automatically redirecting to another site for eg google.com. Can someone please tell me how this is happening and can I change this behaviour?

3
  • 1
    What is in your /etc/hosts file?
    – Jos
    Jul 21, 2014 at 9:46
  • 2
    this is because your default search setting is google.com and your localhost server is unavailable check out oli's answer it is correct I also have same string when I just type local host in my browser window
    – Chinmaya B
    Jul 21, 2014 at 9:51
  • What's your browser?
    – Braiam
    Jul 31, 2014 at 23:38

1 Answer 1

2

I have found that some browsers consider the input as a search string if they don't recognise the domain name format. This is especially common (in my experience) with local network names in Chrome.

I find that simply sticking a / on the end of the address helps the browser decide what to do.

1
  • 1
    mozilla directly adds / to the search string like localhost (only server names)
    – Chinmaya B
    Jul 21, 2014 at 9:54

You must log in to answer this question.

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