Web

NET::ERR_CERT_COMMON_NAME_INVALID: How to Fix a Certificate That Does Not Match the Domain

Talha Aslan 19 min read

Short answer

What is the NET ERR CERT COMMON NAME INVALID (NET::ERR_CERT_COMMON_NAME_INVALID) error, and what should you do first?

NET ERR CERT COMMON NAME INVALID, written in code as NET::ERR_CERT_COMMON_NAME_INVALID, is the error that shows the SSL certificate a site presents does not cover the domain in the address bar. Site owners should check the names on the certificate; visitors should retry from another network with antivirus HTTPS scanning off.

Keep reading for the full details and examples

In practice, the first question most people ask when they see this warning is "was my site hacked?" In most cases the answer is no; the cause is a configuration gap. Still, you need to take it seriously, because visitors cannot reach your site and your forms stop working. In this guide we first separate which side the problem is on, then walk through each cause one by one.

If certificates are new to you, a short definition helps: an SSL certificate is a digital document that proves a site's identity and encrypts the connection. For a fuller explanation, see what is an SSL certificate.

Is the NET ERR CERT COMMON NAME INVALID error on the visitor's side or the site's side?

So the first job is to find out who has the problem. The quickest test: open the site on a phone that uses mobile data, not Wi-Fi. If the same warning appears there, the problem is most likely on the site. If it only appears on one computer or one network, the problem is on the visitor's side.

SymptomLikely causeSideWho fixes it
The www address fails, the non-www address works (or the reverse)The certificate covers only one of the two namesSiteYou can check it; the fix needs the hosting panel or a developer
The main domain works, a subdomain failsThe subdomain is missing from the certificateSiteDeveloper or hosting support
The certificate shows a completely different domainThe domain points to another server, or the server returns a default certificateSiteNeeds a developer
The site sits behind a CDN and the error is newThe CDN or origin certificate does not match the domainSiteNeeds a developer
The error appears only on the office network or one computerAntivirus or a corporate network inspects HTTPS trafficVisitorYou or your IT team
The error appears only on hotel, cafe or airport Wi-FiThe network redirects to its sign in pageVisitorYou can do it
The error appears when you type a short nameThe system completes the name, and the certificate does not cover the short formVisitorYou can do it

The table also tells you something else: most site side causes come from setup decisions about which addresses the site will serve. A corporate website design process that puts those decisions in writing from the start prevents most of these problems before they happen.

According to the Chromium source code, when does this error appear?

Chromium, the project behind Chrome, keeps its error codes and descriptions in a public network error list. According to that list, the error means the certificate the server sent has a name that does not match the host name, and it points to four possible situations:

  1. An attacker may have redirected the traffic to their own server and be presenting their own certificate.
  2. The server may be misconfigured and responding with the wrong certificate.
  3. The user may be on a wireless network that redirects to the network's login page.
  4. Your operating system may have added a DNS search suffix, and the server has no certificate for the short name in the address bar.

In practice, the case we see most often on business sites is the second one: a configuration mistake. However, because of the first possibility, never treat the warning as harmless. Telling visitors to "click through the warning" trains them to do the same during a real attack.

The third and fourth cases sit on the visitor's side. We cover them under separate headings below, because the site owner has nothing to change; they only need to guide the visitor correctly. Even so, knowing which case you face lets you give customers a calm and accurate answer. It also stops you from touching the wrong settings in a panic.

How do you read the domain names on a certificate in your browser?

The heart of the diagnosis is seeing which names the certificate is valid for. You do not need to code for this. In Chrome, click the icon to the left of the address bar, open the connection details and go to the certificate view. Menu labels can change between browser versions; what you are looking for is the certificate's details section.

In the details, check these fields:

  • Subject Alternative Name (SAN): the list of every domain name the certificate is valid for.
  • Common Name (CN): the single field that named the domain in the older system.
  • Validity dates: check these too so you do not confuse the error type.
  • Issuer: shows whether the certificate came from the provider you expect.

If the domain in the address bar is not on the SAN list exactly, you have found the cause. For example, if the list contains only example.com, then www.example.com triggers this error. If the list contains a domain you do not recognize, your server is most likely sending another site's certificate.

If the common name is obsolete, why do browsers check the SAN list?

Although the error says "common name", today's browsers decide based on the SAN list, not the common name. The Let's Encrypt glossary states it plainly: the common name is an obsolete way of naming the domain, and current standards expect software to check only the Subject Alternative Names.

This also has a practical consequence. In some older setups, the certificate's common name shows the right domain while the SAN list does not include it. The browser still throws the error. So when you check a certificate, do not glance at the common name and say "looks fine"; always check the list.

The same glossary also notes that a wildcard certificate covers subdomains only one level deep. That means a *.example.com certificate covers blog.example.com, but not the bare example.com and not deeper names such as a.b.example.com. This rule is the most common source of subdomain problems.

What happens when the certificate does not cover the www or non-www address?

For example, this is the cause we run into most often. You get a certificate for example.com only, but your business card, ad or a link uses www.example.com. When a visitor arrives at the www address, the server sends the certificate that covers only the bare domain, and the browser shows NET::ERR_CERT_COMMON_NAME_INVALID.

So the fix has two steps. First, make sure the certificate covers both names; in many hosting panels and automatic certificate tools, that means adding the second name to the domain list. Then pick one of the two as your main address and permanently redirect the other to it.

A redirect alone is not enough, because the browser checks the certificate first and only sees the redirect afterward. In other words, if there is no valid certificate for the www name, the redirect rule never gets a chance to run. We explain how to choose the main address and set up the redirect in www or non-www.

How does a missing subdomain on the certificate cause the error?

Over time, for instance, businesses add subdomains: booking.example.com for appointments, shop.example.com for a store, a separate page for a campaign. If the main site's certificate does not cover these names, each one throws this error on its own.

Then there are two routes here. First, you can add each subdomain to the certificate's SAN list. Second, you can use a wildcard certificate. Remember the one level rule, though, and add the bare domain to the list separately. We discuss when a wildcard makes sense in what is a wildcard SSL certificate.

If the subdomain points to a third party service, however, things change. For example, a form or booking provider must issue a certificate for your subdomain on its own servers. If you launch the subdomain before that certificate exists, visitors see the provider's own certificate and get the error. In that case, check the provider's custom domain settings.

Why do you see someone else's certificate when the domain points to another server?

Sometimes, however, the certificate details show a completely unfamiliar domain. That means the server the visitor reached does not know your site. The most common reason is a DNS record pointing to a wrong or old IP address. For example, you moved the site to a new server, but one of the domain's records still points to the old one.

These clues help you spot it:

  • The error appears on some networks but not others, because a DNS change does not reach every network at the same time.
  • The certificate lists your old hosting company's domain or another customer's domain.
  • The www and non-www names lead to different servers; one is right, the other is stuck on an old record.

Therefore, make sure every record for the domain points to the right server, which requires access to your DNS management panel. For sites that load on some networks but not on others, our guide on websites that load on some networks only offers further diagnostic steps.

Why does a shared server return a default certificate?

On a shared server, many sites sit behind a single IP address, so the server has to make a choice on every connection. While the connection opens, the server looks at which domain name the browser asks for and sends that site's certificate. The name of this mechanism is SNI (Server Name Indication).

If no certificate for your site exists on the server, or the site's HTTPS setup is incomplete, the server sends whatever default certificate it has. As a result, that certificate usually shows the server's own host name or another site. The visitor then sees NET::ERR_CERT_COMMON_NAME_INVALID.

You tend to see this at three moments. The first is the hours right after you add a new domain to a panel. The second is a failed automatic renewal, and the third is removing a domain from a server without changing its DNS. We cover renewal failures in Let's Encrypt certificate not renewing. Your hosting provider's support team can also tell you whether a certificate for your domain is set up on the server.

How does this error happen behind a CDN or proxy?

A CDN (content delivery network) serves your site's content from servers in different locations. When a site sits behind a CDN or a reverse proxy, there are two connections: one between the visitor and the CDN, and one between the CDN and your origin server.

Consequently, the error can start at either link:

  • The certificate the CDN shows visitors does not cover your domain or subdomain.
  • The CDN connects to your origin, finds that the certificate there does not match the domain, and shows its own error page.
  • You just moved the domain to the CDN, and the CDN has not yet issued a certificate in your name.

To see which link fails, then, look at the certificate issuer. If the issuer is the provider the CDN uses, the problem is on the outer link; if the browser shows your origin certificate, traffic may be bypassing the CDN. For the bigger picture, see does a CDN affect SEO. Settings at this layer usually need a developer.

How do antivirus and network inspection trigger the error for visitors?

Some antivirus programs and corporate security tools step into the middle of HTTPS connections to inspect traffic. To do that, they present their own certificate to the browser. If the program misbehaves or its certificate is not trusted on the system, the browser concludes that the certificate does not match the domain.

Google's Chrome help page on fixing connection errors also advises making sure firewall or antivirus software is not blocking your connection. As a visitor, follow this order:

  1. Open the site from another network, for example your phone's mobile data.
  2. If the error appears on one computer only, briefly turn off the antivirus HTTPS or web scanning feature and try again.
  3. On a work computer, tell your IT team before you touch any settings.
  4. Once you see the result, always turn the protection back on.

If you own the site and the complaint comes from a single customer, the cause is most likely on this side. In that case you do not need to change anything on your site; simply pass these steps on to the customer politely.

Why does the error appear on hotel or cafe Wi-Fi, or with a short name?

Hotel, cafe and airport networks often show a sign in page before letting you onto the internet. People call this page a captive portal. If you try to open an HTTPS site before signing in, the network sends you to its own page. The browser then sees that the certificate does not belong to the site you asked for.

Chrome's connection errors page notes that on public networks you may need to sign in through a portal page. The fix is simple: open the network's sign in page first, sign in, then try the site again.

The fourth case on the Chromium list shows up on internal networks. You type only a short name in the address bar, and the operating system adds the company network's suffix. Since the server has no certificate for the short name, the browser shows the error. The fix is to type the full domain name. In both cases, the site owner has nothing to change.

That said, knowing these cases helps site owners too. For example, if you run a hotel or cafe that offers guest Wi-Fi, a guest who tries your site before opening the sign in page may see this error. So when you share Wi-Fi details, add a short note that the sign in page has to open first.

As a site owner, how do you fix the NET ERR CERT COMMON NAME INVALID error step by step?

Once you have ruled out the visitor side, fix the problem in this order:

  1. Note the exact address that fails: www or non-www, and which subdomain.
  2. Open the certificate details in the browser and compare the SAN list with that address.
  3. If the list shows a domain you do not recognize, check whether your DNS records point to the right server.
  4. If DNS is correct, check the site's HTTPS setup in the hosting panel and which names the certificate covers.
  5. Have the missing name (www or the subdomain) added to the certificate, or have the certificate reissued.
  6. If the site sits behind a CDN, check the CDN's certificate status and origin settings.
  7. Pick your main address and connect every other address to it with a permanent redirect.
  8. After the change, test again from a different network and a private window.

In short, you can handle the first two steps yourself. From step three on, you need access to the DNS panel, the hosting panel or the CDN account. Maybe you lack that access or feel unsure what the settings mean. In that case, ask the developer who manages the site or your hosting support for help. Once the redirect is in place, you can test the chain with our guide on how to check an HTTP to HTTPS redirect.

How do you check the certificate from the command line?

This section is for developers and the technically curious; if you run a business, feel free to skip it. To see which certificate the server really sends, without any browser cache in the way, use the OpenSSL tool:

openssl s_client -connect example.com:443 -servername example.com

The -servername option tells the server which domain you want; in other words, it sends the SNI value. If you leave it out, a shared server may show you its default certificate and you will reach the wrong conclusion. Read the certificate section of the output with openssl x509 -noout -text and look for the Subject Alternative Name line.

Run the same test for the www name, the non-www name and each subdomain. That way you can tell within minutes which name is missing from the certificate. In short, the command line is the cleanest way to confirm what the browser shows. You can also turn this into a habit. Run the same command whenever you add a subdomain or move the site, and you will catch problems before a customer does.

Why might the error persist after you fix it?

Say you fixed the certificate, yet some visitors still see the warning. However, that usually does not mean the fix failed. Changes take time to reach everyone, and that time depends on the setup; the official documentation gives no single delay that applies to everyone.

  • If you changed a DNS record, some networks keep using the old record for a while.
  • The browser may hold an open connection or cached data; a private window and a different browser separate that effect.
  • If you use a CDN, the new certificate has to reach all edge servers.
  • If there are several servers or a load balancer, you may have installed the certificate on only one of them.

So do not test from a single device. Check at least three times, using mobile data, a different Wi-Fi network and a private window. Then confirm with the command line test that the server really sends the new certificate. If the error only persists on networks that still use the old DNS record, waiting is all that is left.

What should you tell a customer who reports the error?

When a customer says "I can't get into your site, it says it's not secure", your reply either protects trust or damages it. The first rule is simple: do not tell the customer to click past the warning. Instead, show that you take the issue seriously and ask for two small pieces of information.

A sample reply: "Thank you for letting us know. Could you share the exact address you typed and the error code shown on the screen? Meanwhile, you could try opening our site on your phone's mobile data. We are looking into it."

Those two details, the exact address and the error code, also give you half the diagnosis. If the customer gets in fine on mobile data, the problem most likely sits on their network. If everyone sees the same error, the problem is on the site and you move to the step list above. Either way, letting the customer know the outcome secures their next visit.

Which SSL errors look like this one?

Chrome's warning page looks similar for different errors, so read carefully; the real difference is the error code at the bottom. If you misread the code, you end up fixing the wrong problem.

This article focuses only on the domain mismatch problem. If your error code is different, switching to the matching guide saves you time.

What are the most common mistakes?

These are the mistakes we see most often among site owners facing NET::ERR_CERT_COMMON_NAME_INVALID:

  • Telling customers to continue to the site through the advanced options on the warning page.
  • Getting a certificate for the main domain only and forgetting www or subdomains.
  • Adding a redirect rule without checking that the certificate covers every name.
  • Leaving a DNS record that points to the old server after a migration.
  • Letting the origin certificate lapse after moving behind a CDN.
  • Making unnecessary changes to the site because of one customer's complaint.

The most dangerous mistake, however, is brushing the error off. Some owners think "we have encryption anyway" and move on. Yet the moment the browser shows the warning, visitor trust takes a hit, and many never come back.

How should you set up your site so the NET ERR CERT COMMON NAME INVALID error never returns?

The lasting fix is not patching certificates one by one but setting up the site's address structure correctly from the start. In a healthy setup, someone writes these decisions down:

  • There is one main address: www or non-www, but only one.
  • There is a list of every domain and subdomain the site uses.
  • The certificate covers every name on that list, and renewal runs automatically.
  • Every other address connects to the main one with a permanent redirect.
  • Ads, brochures and email signatures use only the main address.
  • The business itself holds access to the DNS, hosting and CDN accounts.

This list also pays off when the site changes hands. A new developer does not have to guess which names belong on the certificate; they read it from the list. As a result, a migration or a new subdomain does not trigger the error again.

How can our web design team help at this point?

Talha Aslan and our team are not a hosting company; our job is to build the site correctly. When we design a site, we settle with you during the brief which addresses it will serve, which subdomains it needs and which address will be the main one.

The scope covers information architecture, design built around your brand, speed and Core Web Vitals, SEO foundations such as heading hierarchy, schema markup, a sitemap and a Search Console connection, and an admin panel where you edit content yourself. We also hand over a documented structure that another developer can take over.

If you want a site with an address structure planned from day one, so errors like this do not keep coming back, our web design services page explains the process and how to request a quote. If you want to fix the problem yourself today, the step list above gives you a solid roadmap.

Frequently Asked Questions

Does the NET::ERR_CERT_COMMON_NAME_INVALID error mean my site was hacked?
Usually not. The error typically comes from a certificate that does not cover the domain, a DNS record pointing to the wrong server or inspection on the visitor's network. Still, the Chromium error list also names an attack as a possibility. So do not click past the warning; check the names on the certificate first and find the actual cause.
Is it safe to click past the warning and continue to the site?
No, we do not recommend it. When you click past the warning, you switch off the browser's identity check and can no longer tell a real attack apart. Even on your own site, do not show customers this route. The right path is to make the certificate cover the domain or, if the cause is on the visitor side, check network and antivirus settings.
What should I do if the error appears only on the www address?
Your certificate's SAN list most likely includes only the non-www name, so the browser cannot find the www name on it. Have the certificate reissued to cover both names, then pick one as the main address and permanently redirect the other. A redirect alone is not enough, because the browser checks the certificate before it follows any redirect.
Does a wildcard certificate cover every subdomain?
No, it covers only one level. A wildcard certificate covers a blog subdomain, for example, but not the bare main domain and not two level subdomains. So if you use a wildcard, add the main domain to the certificate list separately and plan a separate solution for deeper subdomains. Check the details with your certificate provider.
If only one customer sees the error, do I need to change my site?
Usually not. An error that appears for one person often comes from their antivirus program, HTTPS inspection on a company network or a Wi-Fi sign in page. Ask the customer to open the site on mobile data. If it loads fine there, leave your site as it is and suggest they check their network side instead.
Who fixes the certificate: me, the hosting company or a developer?
You can handle the diagnosis yourself, since checking the failing address and the names on the certificate requires no code. The fix needs DNS, hosting panel or CDN access. If you have that access, you can follow the panel's guidance; if not, ask the developer who manages the site or your hosting support for help.
  • net::err_cert_common_name_invalid
  • ssl certificate name mismatch
  • your connection is not private
  • subject alternative name
  • wildcard ssl
  • www redirect
  • web design
Share:
Talha Aslan

Google Partner digital marketing expert. Hands-on with SEO, Google Ads, web design and e-commerce projects since 2012; every post here comes from that experience.

Next project

Get a quote for your project.

Your brief goes straight to Talha Aslan and team: strategy led by Talha, delivery by an experienced team. We reply the same day and send the scope, timeline and price as a written quote within 1 business day.