How do I go to localhost in Chrome?

12,437

Try this one instead

http://127.0.0.1:8000/

If you are using different port no. then replace 8000 with it.

Share:
12,437

Related videos on Youtube

Jason Young
Author by

Jason Young

Updated on June 04, 2022

Comments

  • Jason Young
    Jason Young almost 2 years

    EDIT: This issue is no longer reproducible with Chrome 70.x.

    When I type localhost into used-to-be-an-address-bar in Chrome and hit Enter, Chrome takes me to google.com to search for "localhost".

    If I don't hit Enter, a drop-down drops down with options like:

    • Search for localhost
    • Go to localhost/some/path that I have previously visited
    • Go to otherRecentLocation.someDomain/blah?thing=localhost&so=on

    (Hitting Enter of course selects the first of those options.)

    Notice that going to localhost is not an option at all. While the other options are nice, one would expect the ability to go to a valid location like localhost, and moreover that it be the default--i.e. typing localhost and hitting Enter should take you to, literally, http://localhost:80. I was able to go to localhost a few days before posting this originally (3 days ago). Was this changed as a security feature?

    My intent is to test that the web application I am developing is correctly configured to respond with the right payload, e.g. index.html.

    Specs: - Chrome Version 69.0.3497.100 (Official Build) (64-bit) - Ubuntu 16.04 - running an application at https://localhost, which I can access with workarounds.

    Let me know if I should post this question in a different StackExchange site.

    • Myrtue
      Myrtue over 5 years
      Here is another question talking about a closely related problem, but I think the solutions are the same. stackoverflow.com/questions/29050978/…
    • Jason Young
      Jason Young over 5 years
      Be sure to read the question before downvoting.
    • Jason Young
      Jason Young over 5 years
      @Myrtue Thanks, I had not found that one. It is nearly a duplicate, though I don't want to disable searching via the address bar, and that isn't the issue anyway. None of the proposed answers to that question appeared to work for me, either. I'm not sure if the version of Chrome is the cause of the problem.
  • Jason Young
    Jason Young over 5 years
    I'm not sure how I did not try this before, but specifying the port number works (e.g. localhost:80, or in the case of SSL, localhost:443). Specifying the protocol is not necessary, and does not solve the problem without the port number.
  • Jason Young
    Jason Young over 5 years
    This solution does lead to the question: Why can we not go to localhost anymore? Is this a security feature of some kind? Chrome does follow hyperlinks to localhost and localhost.