The difference between localhost and 127.0.0.1

Source: Internet
Author: User

believe that many webmaster in the station, will be first in the local test, and the test is generally used localhost or 127.0.0.1来 access to the local environment, then the access of the localhost and 127.0.0.1 what is the difference? Which is better?

There are many people think that these two are exactly the same, and some people think that 127.0.0.1 is better because it is a local IP and does not need to be parsed from the domain name. In fact, the two are very different:

LocalHost is also called the local, the correct explanation is: the native server

127.0.0.1 the correct interpretation of the system is: Native address (native server)

Localhot (local) is not transmitted through the network card! This is important, and it is not limited by the network firewall and the NIC associated with it. Access to localhost will not be resolved to IP, will not occupy the network network resources.

And 127.0.0.1 is to be transmitted through the network card, rely on the network card, and is subject to the Internet firewall and Nic-related restrictions.

This is why sometimes using localhost can be accessed, but it is not possible to use 127.0.0.1.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.