# Wildcard certificate *.example.com doesn't cover example.com (the bare domain)

**Code:** `apex` · **Category:** SSL / TLS · **Seen on:** SSL, Chrome

A wildcard covers subdomains one level deep, but not the apex domain itself, so https://example.com shows a name mismatch.

## Meaning

Add both names to the certificate: `example.com` and `*.example.com` in the SAN list (most CAs issue the wildcard with the apex included on request). Reissue and redeploy.

## Common causes

- Certificate issued only for `*.example.com`
- Apex requested separately by mistake
- CA/plan limiting SANs
- Redirect from apex to www skipping HTTPS
- Old certificate still deployed

## Quick fix

1. Reissue with `example.com` and `*.example.com`
2. Verify SANs: `openssl x509 -noout -ext subjectAltName`
3. Update the load balancer/server

## Detailed fix by platform

### Shell

1. `sudo certbot certonly --dns-cloudflare -d example.com -d "*.example.com"`

## How to diagnose

1. **SANs** — Include apex?
2. **Wildcard** — Level?
3. **Cert** — Redeployed?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/ssl/wildcard-certificate-does-not-cover-apex-domain)
