Technical Guide Intermediate 12 min read

Subject Alternative Name

The Subject Alternative Name (SAN) extension is what actually tells browsers and clients which domains, IPs, or email addresses a certificate is valid for. Get it wrong, and your users see security warnings. This guide explains how SANs work, how to configure them, and how to manage them at scale.

Quick Facts

Type
Technical Guide
Level
Intermediate
Next
What Is a CSR?

Overview

The Subject Alternative Name (SAN) is an X.509 certificate extension that specifies additional identities bound to the certificate. While the Subject field's Common Name (CN) historically contained the domain name, the SAN extension is now the authoritative field that browsers and clients use to verify identity.

A single certificate can contain multiple SANs, which is how multi-domain certificates work. For example, one certificate might be valid for www.example.com, api.example.com, and mail.example.com. Each of these is a SAN entry of type dNSName.

SANs are defined in RFC 5280, Section 4.2.1.6. They are a critical extension: if a certificate contains a SAN, clients must use it for identity matching and ignore the Common Name entirely.

Key Steps

1

Create an OpenSSL config file

Create a file called san.cnf with the SAN entries you need:

Key Components

dNSName

The most common type. Specifies a fully-qualified domain name the certificate is valid for.

iPAddress

Binds the certificate to a specific IP address. Used for services accessed by IP rather than hostname.

rfc822Name

An email address. Used in S/MIME certificates to bind the certificate to a specific mailbox.

uniformResourceIdentifier

A URI. Used in specialized contexts like SPIFFE IDs for workload identity in service meshes.

Key Requirements

Missing SAN entirely

The most common mistake. A certificate with a CN but no SAN extension will trigger ERR_CERT_COMMON_NAME_INVALID in Chrome, Firefox, and Safari. Always include the primary domain as both CN and a SAN entry.

Forgetting the bare domain

Including www.example.com but not example.com (or vice versa). Users access both, and a missing SAN means a certificate warning for one of them.

Internal hostnames in public certificates

Public CAs cannot issue certificates with internal names like server01.corp.local. Use a private PKI for internal hostnames and reserve public certificates for publicly routable domains.

IP address SAN format errors

IP addresses in SANs must use the IP: prefix, not DNS:. Writing DNS:192.168.1.1 will cause validation failures because the client expects an IP type match, not a DNS lookup.

Overloading a single certificate

Adding dozens of SANs to one certificate creates a large blast radius: if that key is compromised, all domains are affected. It also creates operational coupling. Balance consolidation with risk management.

Comparison

Common Name (CN)Subject Alternative Name
LocationSubject fieldExtension (OID 2.5.29.17)
Multiple valuesNo (single value)Yes (unlimited entries)
Types supportedFree-text stringDNS, IP, email, URI, directory
Browser behaviorIgnored if SAN presentAuthoritative for matching
RFC statusDeprecated for matching (RFC 6125)Required (RFC 5280)
openssl x509 -in cert.pem -noout -ext subjectAltName

X509v3 Subject Alternative Name:
DNS:www.example.com, DNS:example.com, DNS:api.example.com
[req]
distinguished_name = req_dn
req_extensions = v3_req
prompt = no

[req_dn]
CN = www.example.com
O = Example Inc
C = US

[v3_req]
subjectAltName = @alt_names

[alt_names]
DNS.1 = www.example.com
DNS.2 = example.com
DNS.3 = api.example.com
IP.1 = 10.0.1.50
openssl req -new -newkey rsa:2048 -nodes \
-keyout server.key -out server.csr \
-config san.cnf
openssl req -in server.csr -noout -text | grep -A1 "Subject Alternative"

X509v3 Subject Alternative Name:
DNS:www.example.com, DNS:example.com, DNS:api.example.com, IP:10.0.1.50
Key takeaway: Since Chrome 58 (2017), browsers ignore the Common Name if a SAN extension is present. If your certificate has a CN but no SAN, users will see ERR_CERT_COMMON_NAME_INVALID. Always include SANs.
How we help

Evertrust & Subject Alternative Name

SAN policy enforcementEvertrust PKI lets you define certificate templates that restrict allowed SAN types, patterns, and counts. Prevent misconfigured certificates before they're issued.

Full SAN visibilityEvertrust CLM discovers every certificate across your infrastructure and indexes all SAN entries. Search by domain, IP, or email to find every certificate covering a specific identity.

Automated issuance with SANsUse ACME, EST, or REST APIs to request certificates with the exact SANs your services need. No manual OpenSSL configuration required.