Skip to content
Search

Localhost

lastmod 2026-03-02created 2025-04-123 edits

localhost is the loopback address used in computer networks, meaning one's own computer. In other words, it is "an internet address assigned as if virtually connected to the internet" in order to test a computer's networking functions. In IPv4 the IP address is 127.0.0.1, and in IPv6 it is converted to ::1 (short for 0:0:0:0:0:0:0:1).

Because it lets the local computer communicate as if it were a remote computer, it is mainly used for testing.

Simplifying web app addresses with the localhost domain

  • Simplifying web app addresses with .localhost domains | GeekNews
  • Shares the experience of setting up web apps under development to be accessible at simple addresses like appname.localhost, without having to remember ports like localhost:4333
  • With this system, accessing local web apps becomes much more intuitive and clean
  • Each app runs as a launchd daemon on its own port
  • The /etc/hosts file redirects appname.localhost to 127.0.0.1
    • Example: 127.0.0.1 inclouds.localhost
  • Caddy proxies each domain to the appropriate port

See also

  • IP
  • hostname
  • localias - custom local domain aliases for local development servers
  • portless - a tool that replaces port numbers with name-based .localhost URLs

Favorite site

author Zer0 sitemap