If you find yourself in a situation wherein http://localhost:1313 has issues, you can use a domain that redirects to localhost. For example:

When I’m doing local development, I sometimes need a domain name that routes back to localhost. I’ve long run into cases where I need subdomains and ended up modifying my local hosts file. I’ve used this for a variety of situations going back for a long time. From Kubernetes ingress work to web development.

localdev.me DNS is served through amazon. The domain name and any subdomains point to 127.0.0.1.

The next time you need a custom domain or subdomain for local development, instead of hancking your hosts file you might consider localdev.me.

Source: https://codeengineered.com/blog/2022/localdev-me/