Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Localhost
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Name resolution== {{Anchor|Name resolution}} <!--Old name of this section - in case somebody linked to it--> The name ''localhost'' normally resolves to the [[IPv4]] loopback [[IP address|address]] {{IPaddr|127.0.0.1}}, and to the [[IPv6]] loopback address {{IPaddr|::1}}. This resolution is normally configured by the following lines in the operating system's [[hosts (file)|hosts file]]: <pre> 127.0.0.1 localhost ::1 localhost </pre> The name may also be resolved by [[Domain Name System]] (DNS) servers, but there are special considerations{{Ref RFC|6761}} governing the use of this name: * An [[IPv4]] or [[IPv6]] address query for the name localhost must always resolve to the respective loopback address. * Applications may resolve the name to a loopback address themselves, or pass it to the local name resolver mechanisms. * When a name resolver receives an address (A or AAAA) query for ''localhost'', it should return the appropriate loopback addresses, and negative responses for any other requested record types. Queries for ''localhost'' should not be sent to caching name servers. * To avoid burdening the [[Domain Name System]] root servers with traffic, caching name servers should never request name server records for ''localhost'', or forward resolution to authoritative name servers. * When authoritative name servers receive queries for 'localhost' in spite of the provisions mentioned above, they should resolve them appropriately. In addition to the mapping of ''localhost'' to the loopback addresses ({{IPaddr|127.0.0.1}} and {{IPaddr|::1}}), ''localhost'' may also be mapped to other IPv4 (loopback) addresses and it is also possible to assign other, or additional, names to any loopback address. The mapping of ''localhost'' to addresses other than the designated loopback address range in the hosts file or in DNS is not guaranteed to have the desired effect, as applications may map the name internally. In the Domain Name System, the name ''[[.localhost]]'' is reserved as a [[top-level domain|top-level]] [[domain name]], originally set aside to avoid confusion with the <u>hostname</u> ''localhost''.{{Ref RFC|2606}} Domain name registrars are precluded from delegating domain names in the top-level ''.localhost'' domain.{{Ref RFC|6761}}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)