When an HTTPS Certificate Can Cover an IP Address
See how HTTPS verifies a literal IP address, when a public CA can certify one, and what to check for a private or short-lived endpoint.
- https
- tls
- certificates
- guide
You can use HTTPS at a literal IP address if your client trusts the issuing certificate authority and the presented certificate contains that exact address in an iPAddress Subject Alternative Name. A certificate for portal.example can authenticate a visit to that hostname, even if the browser reaches the same server by DNS. The hostname certificate alone cannot authenticate a visit to the server’s numeric address. RFC 9525 defines these matching rules.
Match the certificate to the address the user enters
The client checks the identity in the URL against the corresponding type of certificate entry. Suppose the intended service name is portal.example and the example server address is 192.0.2.10. These are documentation values. They illustrate the choice of identity type, rather than values to submit to a public issuer.
| Client URL | Required identity for this example |
|---|---|
https://portal.example/ | DNS name portal.example |
https://192.0.2.10/ | IP address 192.0.2.10 |
https://[2001:db8::10]/ | IPv6 address 2001:db8::10 |
A reverse DNS record cannot substitute for the IP entry. The certificate identity matches the address directly, without a range or wildcard. If the endpoint receives a new address, a certificate for the old one cannot verify the new URL. A stable DNS name can avoid that coupling when clients are free to use it.
Pick an issuer that can validate the address
For a public service, confirm the IP address is eligible and that you control the address in a way the issuer can validate. The CA/Browser Forum’s public TLS requirements describe permitted validation methods and exclude reserved IP addresses from public certificates. Let’s Encrypt offers IPv4 and IPv6 certificates in a short-lived profile of 160 hours. Its Certbot guide describes obtaining an IP certificate with a client that supports the IP-address option. Check the client’s installation and renewal support separately. Read Let’s Encrypt’s issuance announcement and workflow.
If the endpoint uses a private address or localhost, use a privately trusted development or organizational CA where you control the client trust configuration. Issue its certificate for the identity your clients will actually use. For public visitors who cannot install your organization’s CA, provide a public hostname and use a certificate trusted by those visitors. Requiring a private CA for private services and public trust for public ones keeps the two deployment jobs clear.
Verify the certificate users receive at the literal URL
After installing the certificate at the HTTPS listener, visit the literal URL from a client on the intended network with its normal trust checks enabled. Review the served certificate’s SAN, chain and expiry. If a proxy or load balancer terminates TLS, inspect the edge certificate because that is what the visitor sees. If an HTTPS redirect is part of the design, the certificate on the first HTTPS connection still matters before that redirect can be read.
For a short-lived certificate, confirm renewal and reload both work, then alert on the expiry of the served certificate. Watching the certificate file alone misses a listener that failed to reload. For the routine lifecycle checks, see how to renew a TLS certificate.
