mode7 | 7 years ago | on: Show HN: Mkcert – Valid HTTPS certificates for localhost
mode7's comments
mode7 | 7 years ago | on: Show HN: Mkcert – Valid HTTPS certificates for localhost
In my experience, you don't want HTTPS for localhost, you want HTTPS for a server in the local network so that you can also test on other devices than the development machine.
A convenient solution in case you can control DNS at the local network level is to just get an ordinary certificate for a real domain (for example dev.mydomain.com) and have it resolve to that local IP.
Using your own CA is possible too, of course, but getting it installed on all the devices is a nuisance.
page 1
Re-routing the domain to the local machine (by editing /etc/hosts) should work just the same. A certificate from a trusted CA can be validated without an internet connection, they are part of the OS/Browser distribution.