Skip to content

Troubleshooting guide

ERR_UNSAFE_PORT: how to fix it

Chrome refuses to load web pages from certain port numbers that belong to other protocols, such as 25 (SMTP), 6667 (IRC) or 5060 (SIP), to stop websites from abusing them.

3 min read10 sectionsUpdated

On this page

Key points

  • It is a browser rule, not a network problem.
  • Common in development when an app picks a blocked port.
  • Moving to another port is the fix.
  • A command-line flag can allow a port for testing only.

What it means

Browsers keep a list of restricted ports. Letting web pages talk to mail, IRC or VoIP ports could let a malicious page send commands to those services (cross-protocol attacks). When a URL uses one of them, Chrome stops with ERR_UNSAFE_PORT before connecting.

Common causes

  • A development server on a restricted port (for example 6000, 6665-6669, 10080).
  • A service exposed on a port meant for another protocol.
  • A typo in the port number.

Fixes if you are visiting the site

  1. Check the address for a wrong port.
  2. If a site links you to such a port, tell its owner.

Fixes if it is your site

Serve web traffic on 80/443 or common development ports (3000, 5173, 8000, 8080). For local testing only, Chrome accepts --explicitly-allowed-ports=6000 as a launch flag.

bash
# test with curl, which has no such list
curl -sI http://localhost:6000/

Is it your device, your network or the site?

Work outward in three quick tests. First, open the same address on another device on the same network: if it fails there too, your device is not the cause. Second, switch that device to another network, such as mobile data: if it now works, the problem is your Wi-Fi, router, DNS or a filter on that network. Third, check the site from outside with an independent checker: if it fails from there as well, the site itself is down and only its owner can fix it. Write down the exact error code at each step; support teams can act on ERR_... codes far faster than on "it does not load".

How site owners catch this before visitors do

Most visitors who hit ERR_UNSAFE_PORT leave without telling you. An uptime check every minute, with a keyword assertion on the page and an SSL check on every run, turns this from a support ticket into an alert. Keep the history: errors that come and go (one region, one server behind a load balancer, one in twenty requests) only make sense on a timeline. Put the result on a status page so people stop guessing. You can test any address now with the free website down checker.

Frequently asked questions

Which ports are blocked?

Ports used by other protocols, including 1, 7, 21, 22, 25, 110, 143, 6000, 6665-6669 and 10080, among others.

Is my server broken?

No; the browser refuses that port. curl will still reach it.

Should I use the flag in production?

No, move the service to a normal port.

Watch your own site and services with VitalRix

Uptime checks, APM, logs, real-user monitoring, alerts and status pages in one place. Every product has a free tier and no credit card is needed.