Localhost Explained: Why a Website Preview May Only Work on Your Computer
Why does a localhost preview not open for someone else? Localhost refers back to the device making the request.
1:47 · No narration: the video shows each step as text on screen, and every step is written out below, with buttons that jump the video to it.
Prefer YouTube? Watch this video on our YouTube channel (opens in a new tab).
The six points in the video
This is a silent video. The headings, explanations and labels below reproduce the information on screen.
-
Step 1: Localhost means this device
A loopback address points the request back to the local computer.
On-screen labels: Current device; Local request; Loopback address.
-
Step 2: 127.0.0.1 is a common example
It is an IPv4 loopback address used for local services.
On-screen labels: IPv4 loopback; Local computer; Local service.
-
Step 3: A local server must be running
The preview needs the development service to be available.
On-screen labels: Running preview service; Local application; Working request.
-
Step 4: The port selects the service
A number after the hostname can identify the local service port.
On-screen labels: Local hostname; Port number; Correct service.
-
Step 5: Another device has its own local
Its localhost refers to that device, not your computer.
On-screen labels: Different device; Different local service; No shared address.
-
Step 6: Use an appropriate shared preview
Ask for a hosted preview or another agreed review method.
On-screen labels: Shared preview URL; Suitable access; Actual production status.
A practical check for your business
Use a local preview to check a proposed change before release. Remember that another person's computer has its own localhost, and review the actual deployed address separately when sharing the result.
Sources and further detail
Common questions
Why does a localhost preview not open for someone else?
Localhost refers back to the device making the request. Use the correct shared preview when someone else needs to review.
Go further
More video tips
All 205 videos →
Network Ports Explained: The Number After a Website Hostname
Network ports, explained.
Parts of a Website URL Explained: Scheme, Host, Path, Query and Fragment
URL parts, explained.