Chat on WhatsApp
Tech Q&A

ERR_CERT_COMMON_NAME_INVALID: Causes, Fixes, and Troubleshooting Guide

Website security is essential for protecting user data and building trust online. One of the most important components of website security is an SSL/TLS certificate, which encrypts communication between a browser and a web server.

However, users and website owners may sometimes encounter SSL certificate errors that prevent secure connections. One of the most common SSL errors is ERR_CERT_COMMON_NAME_INVALID.

This error occurs when the domain name in the SSL certificate doesn’t match the website address the user is trying to access. As a result, browsers cannot verify the website’s identity and display a security warning.

In this guide, we’ll explain what the ERR_CERT_COMMON_NAME_INVALID error means, why it occurs, how to fix it, and best practices to prevent it.

What Is ERR_CERT_COMMON_NAME_INVALID?

The ERR_CERT_COMMON_NAME_INVALID error indicates that the SSL certificate installed on a website does not match the domain name being accessed.

For example:

Website URL:

https://www.example.com

SSL Certificate:

example.com

Because the certificate was issued for example.com and not www.example.com, browsers display:

Your connection is not private

NET::ERR_CERT_COMMON_NAME_INVALID

The browser cannot verify that the website is legitimate.

Understanding SSL Certificates and Common Names

What Is an SSL Certificate?

An SSL certificate is a digital certificate that:

  • Encrypts website traffic
  • Verifies website ownership
  • Protects sensitive data
  • Enables HTTPS connections

What Is a Common Name (CN)?

The Common Name (CN) is the domain name for which the SSL certificate is issued.

Examples:

example.com

www.example.com

subdomain.example.com

The browser checks whether the URL matches the certificate’s Common Name or Subject Alternative Names (SANs).

How SSL Validation Works?

When a user visits a website:

  1. Browser requests a secure connection.
  2. Server sends its SSL certificate.
  3. Browser verifies the certificate.
  4. Browser checks the domain name.
  5. If the domain matches → Secure connection established.
  6. If the domain doesn’t match → ERR_CERT_COMMON_NAME_INVALID.

Workflow:

Browser Request
↓
SSL Certificate Received
↓
Domain Name Matches?
┌─────────────┐
│ Yes │ → Secure Connection
└─────────────┘
↓ No
ERR_CERT_COMMON_NAME_INVALID

Common Causes of ERR_CERT_COMMON_NAME_INVALID

Several issues can trigger this error.

1. SSL Certificate Installed for the Wrong Domain

This is the most common cause.

Example:

  • Certificate issued for: example.com
  • Website accessed through: www.example.com

Because the domains don’t match, the browser shows the error.

Additional lines:
A browser expects the certificate’s common name or Subject Alternative Name (SAN) to match the exact domain being visited. Even a small mismatch causes the SSL verification to fail, resulting in this error.

2. Missing WWW or Non-WWW Version

Many websites forget to include both versions of their domain in the SSL certificate.

Examples:

  • https://example.com
  • https://www.example.com

Both should be covered by the certificate.

Additional lines:
If your certificate only secures one version, visitors using the other version may encounter security warnings. Configuring proper redirects and including both hostnames in the certificate helps prevent this issue.

3. Subdomain Not Included in Certificate

Example:

  • Certificate: example.com
  • Website: blog.example.com

The certificate does not cover the subdomain.

Additional lines:
Unless you’re using a wildcard or multi-domain certificate, each subdomain requires its own SSL coverage. This issue commonly appears when new subdomains are added without updating the certificate.

4. Incorrect Certificate Installation

The server may have:

  • Installed the wrong certificate.
  • Installed an old certificate.
  • Installed a certificate from another domain.

This commonly occurs on shared hosting environments.

Additional lines:
Incorrect certificate installation can also happen after server migrations or manual configuration changes. Verifying the installed certificate chain and server settings can quickly identify the mismatch.

5. Self-Signed SSL Certificates

Development servers often use self-signed certificates.

Browsers cannot properly verify them and may display certificate warnings.

Additional lines:
Self-signed certificates are suitable for testing but should never be used on production websites. Public-facing sites should always use certificates issued by a trusted Certificate Authority (CA).

6. CDN or Proxy Configuration Issues

Services like:

  • Cloudflare
  • AWS CloudFront
  • Reverse proxies

can cause certificate mismatches if SSL settings are configured incorrectly.

Additional lines:
If the origin server and CDN use different SSL configurations, visitors may receive certificate errors even when the certificate itself is valid. Reviewing SSL modes and edge certificate settings usually resolves the problem.

7. Expired or Reissued Certificates

After migrating or renewing certificates, DNS and server configurations may still reference the previous certificate.

Additional lines:
Browser or CDN caches may also continue serving an outdated certificate for a short period after renewal. Clearing caches and confirming the active certificate on the server can help eliminate the error.

How to Fix ERR_CERT_COMMON_NAME_INVALID?

1. Refresh the Page

Temporary SSL issues can occasionally resolve after refreshing.

Additional lines:
Sometimes the browser loads an outdated SSL certificate due to a temporary network or caching issue. A simple refresh can force the browser to request the latest certificate from the server.

2. Clear Browser Cache

Old SSL information may be stored in the browser.

Chrome

  1. Open Settings.
  2. Select Privacy & Security.
  3. Click Clear browsing data.
  4. Reload the website.

Additional lines:
Cached website data or stored SSL information may prevent the browser from recognizing a newly installed certificate. Clearing the cache ensures the browser retrieves fresh security information.

3. Check the Website URL

Ensure you’re visiting the correct version:

https://example.com

instead of:

https://www.example.com

if only one version is configured.

Additional lines:
A website certificate may only be valid for one domain variation. Using the correct URL or allowing the site to redirect automatically can help avoid certificate mismatch errors.

4. Check System Date and Time

Incorrect device time can interfere with certificate validation.

Windows

Settings → Time & Language → Date & Time

Enable:

  • Set time automatically

Additional lines:
SSL certificates have specific validity periods, and an incorrect system clock may make a valid certificate appear expired or not yet active. Synchronizing your device’s date and time usually resolves this problem.

5. Disable Antivirus HTTPS Scanning

Some antivirus software intercepts SSL connections.

Temporarily disable:

  • HTTPS Scanning
  • SSL Inspection
  • Web Protection

Then try accessing the website again.

Additional lines:
Certain security programs replace website certificates with their own for scanning purposes, which can trigger certificate mismatch errors. If disabling HTTPS scanning fixes the issue, update your antivirus settings or contact the software vendor for guidance.

Fixes for Website Owners

1. Install the Correct SSL Certificate

Ensure the certificate matches your domain.

Example:

  • example.com
  • www.example.com

Additional lines:
Verify that the installed certificate is issued for the exact domain visitors use to access your website. If multiple domains point to the same server, each one should be covered by the certificate or redirected appropriately.

2. Add Subject Alternative Names (SAN)

Modern certificates support multiple domains.

Example:

  • example.com
  • www.example.com
  • blog.example.com
  • api.example.com

SAN certificates prevent domain mismatch errors.

Additional lines:
A Subject Alternative Name (SAN) certificate allows you to secure multiple domains and subdomains with a single SSL certificate. This is especially useful for businesses managing several related websites or services.

3. Use a Wildcard Certificate

For multiple subdomains:

*.example.com

This covers:

  • blog.example.com
  • app.example.com
  • api.example.com

Additional lines:
Wildcard certificates simplify SSL management by securing all first-level subdomains under a single domain. However, they do not protect the root domain unless it is explicitly included in the certificate.

4. Redirect All Traffic to One Domain Version

Apache example:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.example\.com [NC]
RewriteRule ^(.*)$ https://example.com/$1 [L,R=301]

Additional lines:
Choose either the www or non-www version of your website as the primary domain and redirect all traffic to it. Consistent redirects improve both SSL validation and search engine indexing.

5. Verify Certificate Installation

Use:

openssl s_client -connect example.com:443

This command displays:

  • Certificate information
  • Expiration dates
  • Domain names

Additional lines:
You can also use online SSL testing tools to verify that the correct certificate and intermediate certificates are installed. Checking the complete certificate chain helps identify configuration issues that browsers may flag.

6. Reissue the SSL Certificate

If the certificate doesn’t cover the correct domains, generate a new certificate.

Let’s Encrypt example:

sudo certbot --apache -d example.com -d www.example.com

Additional lines:
After reissuing the certificate, restart your web server and confirm that the new certificate is being served correctly. It’s also a good idea to clear any CDN or server cache to ensure visitors receive the updated SSL certificate.

ERR_CERT_COMMON_NAME_INVALID in Different Platforms

WordPress Websites

Common causes include:

  • Incorrect Site URL settings
  • Missing WWW certificate
  • CDN conflicts

Check:

WordPress Dashboard

→ Settings

→ General

Ensure both URLs match.

Cloudflare

Verify SSL mode.

Recommended setting:

Full (Strict)

Incorrect SSL modes frequently cause certificate mismatches.

AWS Load Balancers

Ensure:

  • Correct certificate is attached.
  • Correct domains are included.

Local Development Environments

Using:

localhost

may trigger certificate warnings because browsers don’t trust local certificates.

Tools to Diagnose SSL Certificate Problems

Several tools can help identify certificate issues.

Tool

Purpose

SSL Labs SSL Test

SSL configuration analysis

OpenSSL

Certificate inspection

Qualys SSL Checker

SSL diagnostics

Mozilla Observatory

Security analysis

Browser Developer Tools

Certificate information

Secure Your Website and Eliminate SSL Errors

Protect your website with expert SSL configuration and security solutions. Devstree helps businesses diagnose certificate issues, implement secure connections, and ensure reliable website performance for users and search engines.

Get Expert SSL Support

Conclusion

The ERR_CERT_COMMON_NAME_INVALID error occurs when a website’s SSL certificate doesn’t match the domain name being accessed. Although it can be frustrating for users, the issue is usually caused by certificate misconfiguration, missing domain coverage, or incorrect server settings.

By installing the correct SSL certificate, including all necessary domain variations, configuring redirects properly, and regularly monitoring SSL health, website owners can eliminate this error and provide secure, trustworthy browsing experiences.

Ready to Build Your Next Digital Product?

Partner with our experienced engineering team to turn your complex ideas into robust, high-performing applications.

Contact Us