Using PortroomPretty URLs & HTTPS

Using Portroom

Pretty URLs

Pretty URLs let you open http://shop.localhost instead of remembering a port. The address stays the same even when the port changes.

They're built in and on from the start: there's nothing else to install. Without them, projects open on http://localhost:port.

How it works

Portroom listens on port 80 and passes each request to the server whose name is in the address. When a port changes, the name follows at once.

  • Each project gets http://<pretty-url>.localhost. Set the name when you add or edit a project.
  • http://localhost and http://dev.localhost list all your projects.
  • If a project is stopped, or still starting, the page says so and opens the site by itself once the server is up.
  • Hot reload works as usual: WebSocket connections pass through untouched.
  • Only your own Mac can open these addresses. Connections from other devices are closed.
  • PROXY in the top bar shows whether Pretty URLs work. Click it to open the settings.

macOS 26, Chrome and Firefox send any *.localhost name to your own Mac by themselves, so no DNS setup is needed. Pretty URLs work while Portroom is open; your servers keep running when it's closed, on localhost:port.

Safari on macOS 15

macOS 15 doesn't know .localhost names yet, so Safari, and other apps that ask the system, can't find shop.localhost; Chrome and Firefox can. Settings ▸ Ports & URLs ▸ Safari and other apps ▸ Set Up fixes it once: macOS asks for your password, Portroom puts a small file in /etc/resolver that sends .localhost names to Portroom, and Portroom answers with your own Mac's address, on 127.0.0.1 port 53535. Nothing else changes, and other names never reach Portroom. Until you set it up, Portroom's Open buttons use localhost:port. Remove in the same row takes the file away, and so does Help ▸ Uninstall Portroom…. On macOS 26 the row isn't shown: there's nothing to set up.

macOS may ask once whether Portroom may accept incoming connections. Allow it: Portroom still only answers your own Mac.

HTTPS

Turn on HTTPS in Settings ▸ Ports & URLs to open projects at https://<pretty-url>.localhost too, useful for secure cookies, service workers, OAuth callbacks and APIs that need a secure page. HTTPS is part of Pro from version 1.0; during the beta it's free.

  • The first time, Portroom makes a certificate authority of this Mac's own, and macOS asks for your password to trust it. That's the only time.
  • Each name then gets its own certificate, made when a browser first asks for it. The authority's key stays in Portroom's folder on your Mac and never leaves it.
  • The authority can sign localhost names only. Even with its key, nobody could use it to pass off another website as the real one. If Settings ▸ Ports & URLs shows Renew next to Certificate, your authority was made before this limit existed: Renew replaces it with a limited one, and macOS asks for your password again.
  • Portroom listens on port 443 for HTTPS, next to port 80. Plain http:// addresses keep working.
  • Safari and Chrome use the macOS trust settings. Firefox does too when security.enterprise_roots.enabled is on in about:config.
  • Remove next to Certificate takes the trust back and deletes the certificates.

Settings

In Settings ▸ Ports & URLs:

Setting What it does
Pretty URLs Turns them on or off
HTTPS Adds https:// addresses; asks macOS to trust Portroom’s certificate the first time
Safari and other apps macOS 15 only: Set Up lets Safari open .localhost names, with your password once; Remove takes that back
Certificate Renew replaces an authority made before it was limited to localhost; Remove takes the trust back and deletes the certificates
Status card Shows whether Pretty URLs work, or what holds port 80, with Try again

Port 80 is taken

Only one app can listen on port 80. If another one does, such as a Caddy or nginx you installed, the status card names it and projects open on localhost:port. Quit that app, or stop its service, and Portroom takes the port over within a few seconds. For a Homebrew service:

bash
brew services stop caddy

Turning it off

Turn off Pretty URLs. Portroom frees port 80 and opens projects on localhost:port.

Problems

See Troubleshooting.

Something unclear or missing on this page? Write to support@portroom.dev.