Site AI Auditвід Internet Solutions

SSL Certificate Name Mismatch: Causes and How to Fix It

12 серпня 2026 р.Час читання: 7 хвБезпека та SSL
SSL Certificate Name Mismatch: Causes and How to Fix It

Short answer: A certificate name mismatch (in Chrome, NET::ERR_CERT_COMMON_NAME_INVALID) means the server presented a certificate that does not list the hostname the visitor typed. Typical causes are a certificate that covers example.com but not www.example.com, a subdomain that was never added, a shared server sending its default certificate, or a CDN that does not yet cover a new hostname. The fix is to reissue the certificate with every hostname you use, make sure the server selects it for each name, and redirect unused names to your main address.

Name mismatch errors are frustrating because the certificate is often perfectly valid – just not for the address the visitor used. You might test your site at https://example.com and see a padlock, while a customer who typed www.example.com gets a full-page warning. This guide explains how browsers match names, the situations that most often cause mismatches, and how to find and fix them for good.

How browsers match certificate names

Every certificate contains a list of hostnames in a field called Subject Alternative Name (SAN). When a browser connects, it compares the hostname in the address bar with that list. If there is an exact match, or a matching wildcard, the connection continues. If not, the browser stops with a name mismatch error, even if everything else about the certificate is fine.

A few rules catch people out:

Cause 1: The www or non-www name is missing

This is by far the most common case. Someone requested a certificate for the main domain only, or added www later without reissuing the certificate. Visitors who use the other form of the address see an error – and they will, because people type addresses both ways and old links use both forms.

Fix: reissue the certificate with both names. In most hosting panels, this means ticking both names when issuing the certificate. With Certbot: certbot --nginx -d example.com -d www.example.com (or the equivalent for Apache). Then redirect the name you do not use to the one you do. Note that the redirect only works after the certificate is valid for both names, because the browser checks the certificate before it sees any redirect.

Cause 2: A subdomain was never included

Subdomains accumulate over the years: shop., blog., booking., mail., webmail., old., dev., campaign landing pages. Each needs a certificate covering its exact name. A subdomain that points to your server but is not in any certificate produces a mismatch, because the server falls back to another certificate.

Fix: list all DNS records for your domain and open each hostname over HTTPS. For each one that should work, add it to a certificate. For each one that is no longer needed, remove its DNS record instead of leaving it pointing at a server that cannot serve it correctly. Abandoned subdomains are also a security risk if they point to services you no longer control.

Cause 3: The server sends the wrong certificate

On a server hosting many sites, the browser tells the server which hostname it wants during the connection (a TLS extension called Server Name Indication, SNI). The server then picks the matching certificate. If no virtual host is configured for that name – or the configuration has a typo – the server falls back to its default certificate, which belongs to another site or to the hosting company.

Signs of this cause: the certificate the browser shows names a completely different domain, often the server’s own hostname or another customer’s site.

Fix: make sure the HTTPS virtual host (Apache) or server block (Nginx) lists the hostname in ServerName/ServerAlias or server_name, points to the right certificate files, and is enabled. On shared hosting, add the domain or alias in the control panel and issue the certificate there.

Cause 4: CDN, proxy or load balancer certificates

If your site sits behind a CDN or load balancer, visitors see the certificate presented by that service, not the one on your server. Adding a new hostname in DNS pointing to the CDN does not automatically mean the CDN’s certificate covers it. Some services issue edge certificates automatically for proxied names, others need the name to be added in their dashboard, and some plans limit which subdomain levels are covered.

Fix: check the certificate list in the CDN or load balancer dashboard, add the missing name and wait for issuance. Also check the certificate between the CDN and your origin server; strict modes require the origin certificate to match the hostname as well.

Cause 5: Hosted services on your subdomains

Many businesses point subdomains to external services: a helpdesk at help.example.com, a shop platform at shop.example.com, an e-mail marketing tracking domain, a booking system. If the service has not issued a certificate for your custom domain – or the setup was never finished – visitors get a mismatch showing the service’s own domain.

Fix: complete the custom domain setup in the service’s settings, which usually includes a verification record and automatic certificate issuance. If the service does not support HTTPS on custom domains, use its own address instead of a subdomain of yours.

How to find out which names are covered

Three quick ways to see the names in a certificate:

  1. Browser: click the padlock or warning icon, open the certificate details and look for “Subject Alternative Name” or “DNS Name” entries.
  2. Command line: openssl s_client -connect example.com:443 -servername www.example.com </dev/null | openssl x509 -noout -ext subjectAltName shows the names the server presents for the hostname in -servername.
  3. Certificate transparency logs: all publicly trusted certificates are logged, and public search tools for these logs show every certificate issued for your domain, which helps discover forgotten subdomains.

Test every hostname separately, because the server can present different certificates for different names.

Preventing name mismatches

HabitWhat it prevents
Always issue certificates for both www and non-wwwThe most common mismatch
Keep an inventory of subdomains and their ownersForgotten names without certificates
Remove DNS records for services you no longer useMismatches and subdomain takeover risks
Add new hostnames to the certificate before announcing themErrors on launch day
Test each hostname from outside after changesWrong virtual host or CDN configuration

Name mismatches and search engines

A mismatch on a hostname that search engines know about is not only a visitor problem. Crawlers that follow old links to the uncovered name cannot fetch the page, and if the uncovered name is the one you declared as canonical, whole sections of your site can drop out of results. Fixing the certificate and redirecting the unused hostname to your main address with a permanent redirect keeps link signals together. Check your search console after the fix for crawl errors on the affected hostname.

How Site AI Audit helps

Every Site AI Audit check starts by connecting to your website and checking whether the certificate is valid for the address, when it expires and whether HTTP redirects to HTTPS. Problems are explained in plain words with the fix. Monitoring on paid plans repeats the check automatically and alerts you when something breaks, which is useful after DNS, hosting or CDN changes – the moments when mismatches usually appear. Run a free check.

Related reading

The bottom line

A name mismatch means the certificate is valid, but not for the address the visitor used. List every hostname your business uses, make sure each one is in a certificate and selected correctly by the server or CDN, and redirect the names you do not use. Most mismatches are fixed by reissuing one certificate with the missing name – the harder part is finding every name, which is why an inventory and regular external checks pay off.

FAQ

Why does my site work without www but show an error with www?

The certificate lists only the bare domain. Reissue it with both names and then redirect www to your preferred address, or the other way round.

Does a wildcard certificate cover the main domain?

No. A wildcard for *.example.com covers subdomains one level deep but not example.com itself. Most providers include the bare domain as an extra name, but check the certificate details to be sure.

Can I fix a name mismatch with a redirect?

Not on its own. The browser checks the certificate before it receives any redirect, so the hostname being redirected must also be covered by a valid certificate.

Why does the error show another company’s domain?

The server or hosting platform does not have a configuration for your hostname and falls back to its default certificate. Adding the hostname to your hosting account or virtual host configuration usually fixes it.

Is a name mismatch dangerous for visitors?

It can be a sign of an attack, which is why browsers block the page. In most real cases it is a configuration error, but visitors cannot tell the difference, so it should be fixed quickly.

#HTTPS#SSL certificate#TLS
Перевірте свій сайт — безкоштовно.Що виправити на вашому сайті — і з чого почати.
Почати безкоштовно

Ще з блогу

Усі статті →
Internet Solutions

Інші продукти нашої команди

Створено Internet Solutions. Спробуйте й інші наші продукти — кожен заощаджує час по-своєму.

internet-solutions.net ↗
01Автопостинг у соцмережі
PostRSS

Нові записи з вашого RSS-фіду автоматично публікуються у Facebook, X, LinkedIn, Telegram та ще 60+ мережах.

Безкоштовний тариф · з 2014Перейти →
02AI-чат для сайтів
Talkmio

Ваш сайт відповідає відвідувачам 24/7 на основі вашого контенту та їхньою мовою.

Безкоштовний тариф · без карткиПерейти →
03AI-асистент
Ask Mio

Чат, код, дизайн, тексти та дослідження. Mio добирає найкращу модель для кожного завдання.

Безкоштовний тарифПерейти →
04AI-автопілот для блогу й соцмереж
AI Blog Autopilot

AI пише SEO-статті на 2000–3000 слів і публікує кожну в 58+ соцмережах.

Перші 3 статті безкоштовноПерейти →
05Глибокий SEO-аудит
Site SEO AI Audit

Повне SEO-сканування за 7 напрямами, зокрема видимість в AI-пошуку, з виправленнями за силою впливу.

Перший аудит безкоштовноПерейти →
06RSS і товарні фіди
RSS Feed Creator

Створюйте RSS з будь-якої вебсторінки, а також товарні фіди для Google і Meta, що оновлюються самі.

Безкоштовний тарифПерейти →
07Розробка сайтів і SEO
Internet Solutions

Сайти, інтернет-магазини та індивідуальні системи — проєктує, створює й супроводжує наша команда.

З 2011Перейти →
Site AI Audit
Огляд конфіденційності

Цей сайт використовує cookie, щоб ми могли забезпечити вам найкращий користувацький досвід. Інформація cookie зберігається у вашому браузері й виконує такі функції, як розпізнавання вас під час повернення на сайт, а також допомагає нашій команді зрозуміти, які розділи сайту вам найцікавіші та найкорисніші.