Definition

Inspect the DNS entries in the served leaf's Subject Alternative Name (SAN) extension. Where the client allows wildcards, a wildcard occupies the entire leftmost label and matches exactly one label. A certificate can also have explicit names or other wildcard entries in its SAN list.

Check apex, single-label and nested names

Check all DNS SANs in the leaf when deciding if it covers a name. The modern service identity standard uses SAN identifiers for this check. Some legacy clients apply different rules, so reproduce the validation error with the affected client when its behavior matters.

HostnameMatches a SAN containing only *.example.com?Coverage to check
api.example.comYesThe leftmost label is api.
example.comNoLook for a separate example.com DNS SAN.
v2.api.example.comNoLook for the exact hostname or an applicable *.api.example.com SAN.
api.example.netNoThe domain suffix differs.
Official sourcesRFC 9525, Matching DNS Names ↗

Read the SANs from the actual TLS listener

  1. Capture from an authorized endpoint

    Run openssl s_client -connect api.example.com:443 -servername api.example.com -showcerts </dev/null. Use the hostname clients request and the port they reach. Save the first certificate from the presented list as observed-leaf.pem.

  2. List the DNS names

    Run openssl x509 -in observed-leaf.pem -noout -ext subjectAltName. Compare the intended hostname with the displayed DNS entries and record the observed fingerprint if you are verifying a rollout.

  3. Verify the live hostname and trust path

    Run openssl s_client -connect api.example.com:443 -servername api.example.com -verify_hostname api.example.com -verify_return_error </dev/null with the relevant trust store. Check the verification result and preserve any error text with the observation.

Official sourcesOpenSSL s_client documentation ↗OpenSSL x509 documentation ↗

Fix the cause of the mismatch

If the intended certificate lacks a DNS entry covering the failing hostname, review the issuance request and choose an approved explicit name or wildcard for that scope. If the intended certificate covers the name but the served certificate has a different fingerprint, inspect the SNI binding and certificate attachment at the TLS termination point.

If the served name matches and trust verification still fails, inspect the intermediate certificates, validity and trust policy. Repeat the relevant checks on each authorized edge in the rollout and record the hostname, address, time and result.

Frequently asked questions

Does *.example.com cover example.com?

The wildcard needs one label before example.com. Include an explicit example.com DNS SAN when the apex must be covered.

Does *.example.com cover v2.api.example.com?

It covers one label before example.com. Check for an explicit v2.api.example.com entry or a wildcard such as *.api.example.com where the client policy permits it.

Why does my browser report a mismatch when I installed the wildcard certificate?

Check the served leaf with the exact SNI name the client sends. Compare the observed fingerprint and SANs with the expected certificate, then review the certificate binding if they differ.