Localhost TLD in Safari not found

1. The problem I’m having:

Safari can’t connect to a.localhost domain, while other browsers can.

2. Error messages and/or full log output:

Safari can’t open the page “https://rootable.localhost” because Safari can’t find the server “rootable.localhost”.

3. Caddy version:

v2.11.4 h1:XKxkMTgNSizEvKG6QHue6cAsFOteU2qA61w2tKkCWi0=

4. How I installed and ran Caddy:

macOS homebrew (brew install caddy)

a. System environment:

macOS 15.7.4

Using caddy just by itself via the terminal. No systemd, docker, etc.

b. Command:

caddy run

c. Service/unit/compose file:

n/a

d. My complete Caddy config:

rootable.localhost {
  reverse_proxy localhost:3000
}

5. Links to relevant resources:

I’ve also looked at Localhost on OSX works in Chrome, but not Safari and the only solution offered was to add 127.0.0.1 *.localhostto my /etc/hosts and I’ve done that.

Is that really your full Caddyfile?

It is. You can even see it in the repo, here: https://codeberg.org/rootable/tomato/src/branch/main/Caddyfile