Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Certificate for wrong hostname (name mismatch): how to fix it

OPS-055High impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

When a browser opens an HTTPS page, the server sends a certificate. The certificate carries a list of hostnames it is valid for, called the Subject Alternative Name (SAN) list. The browser compares the hostname in the address bar with that list. If there is no match, it stops and shows an error such as NET::ERR_CERT_COMMON_NAME_INVALID (Chrome) or SSL_ERROR_BAD_CERT_DOMAIN (Firefox).

Why it costs you leads or sales

Where a visitor is lost
  1. Ad clickVisitor clicks your ad
  2. TLS handshakeCertificate does not list the hostname
  3. Landing pageNever displayed
  4. Form or checkoutNever reached
  5. Conversion tagNever fires

The warning appears before any page content loads, so every later step is lost.

Visitors reaching the formExample numbers
Visitors reaching the form (example)Valid certificate: 100 visitors; Name mismatch: 10 visitors0387710010Valid certificateName mismatchvisitors

Example: out of 100 paid clicks, a warning page stops most visitors before the form. Numbers are illustrative.

How to check if your site has it

Check the certificate hostnames
  1. Open the exact URL in a private window

    Test every hostname you use in ads and emails: apex, www, shop, checkout, landing page subdomains. A warning page means a problem.

  2. Inspect the certificate

    In Chrome, click the padlock or warning icon, open the certificate details and read the Subject Alternative Name field. Your hostname must appear there or be covered by a wildcard at the right level.

  3. Check from the command lineCustom code

    Run the command below and read the 'DNS:' entries in the output.

  4. Check DNS

    Confirm the hostname points to the server or platform you expect. An old A record can send visitors to a server holding a different site's certificate.

List the hostnames a certificate coversbash
echo | openssl s_client -connect www.example.com:443 -servername www.example.com 2>/dev/null | openssl x509 -noout -ext subjectAltName

How to fix it

Fix by platform
  1. Find who issues the certificate

    Check your host's control panel (SSL/TLS section). Most hosts offer a free certificate per domain.

  2. Reissue for every hostname

    Add the missing domain or subdomain and reissue or reinstall the certificate.

  3. Update site URLs

    In Settings > General, make sure WordPress Address and Site Address use the hostname the certificate covers.

Issue one certificate for several hostnames (certbot)bash
sudo certbot --nginx -d example.com -d www.example.com -d shop.example.com

How to confirm it's fixed

After the change
  • Every hostname used in ads, emails and links opens with a padlock in a private window.
  • The openssl command lists each hostname in the SAN output.
  • http:// versions redirect to the https:// hostname that has a valid certificate.
  • Your form submits and a test lead arrives.
  • Your conversion tags fire on the thank-you page.

How to prevent it happening again

Habits that avoid repeat mismatches
  • Keep a list of every hostname you use for pages, forms, checkout and tracking.
  • Add the new hostname to the certificate before pointing DNS or ads at it.
  • Remove DNS records for old servers and unused subdomains.
  • Re-check after changing host, CDN, DNS or platform.
  • Know who owns certificates for each hostname (host, platform or CDN).

How FunnelGuard handles this

Frequently asked questions

Questions people ask

Why does my site say the certificate does not match the domain?

The certificate your server sends does not list the hostname in the address bar. Common reasons are a certificate issued for another domain, a missing subdomain, a wildcard used at the wrong level, or DNS pointing to the wrong server.

What does NET::ERR_CERT_COMMON_NAME_INVALID mean?

It is Chrome's error for a name mismatch. The hostname you opened is not in the certificate's Subject Alternative Name list. Fix it by issuing or installing a certificate that includes that exact hostname.

Does a wildcard certificate cover all subdomains?

No. A wildcard such as *.example.com covers one level, like shop.example.com, but not a.shop.example.com and not the bare example.com unless that is also listed. Add the missing names to the certificate.

How do I check which domains my SSL certificate covers?

Click the padlock or warning icon in your browser and open the certificate details, then read the Subject Alternative Name field. You can also run openssl s_client with -servername and view the subjectAltName extension.

Can DNS cause an SSL name mismatch?

Yes. If a hostname points to an old or different server, that server may present its own certificate, which does not list your name. Correct the DNS record and make sure the right server has a certificate for the hostname.

Will a name mismatch hurt my ad results?

Yes. Visitors who hit the browser warning usually leave, so the page, form and conversion tags never load. You still pay for the click but record no lead or sale.

How can I be alerted when my certificate does not match?

A synthetic monitor that loads your real pages on a schedule will see the failure. FunnelGuard does this, re-checks from a second region and sends one alert with a screenshot and a likely cause.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.