Ssl error bad cert domain nginx

SSL_ERROR_BAD_CERT_DOMAIN happens mainly due to domain name mismatch, incorrect SSL configuration, certificate expiry, etc.

Is your secure website showing error code SSL_ERROR_BAD_CERT_DOMAIN? Fix it now!

Most browsers show the bad cert error due to incorrect SSL certificates, cert expiry, or even browser cache.

An error on the secure website can make it unavailable on the internet.

At Bobcares, we fix SSL errors for our customers as part of our Server Management Services.

Today, we’ll see the causes of bad cert error and their fixes.

Where do we see SSL_ERROR_BAD_CERT_DOMAIN error?

Let’s first check where exactly we see the bad certificate error.

As part of security standards, most browsers recommend accessing the websites via https:// link. This encrypts the data transfer between the browser and the webserver. However, when there are problems with the SSL certificate, it shows error in the browser.

On browsing the website using a secure link, the error appears as:

SSL_ERROR_BAD_CERT_DOMAIN

What causes SSL_ERROR_BAD_CERT_DOMAIN error?

It’s now time to see the causes of the bad certificate error in the browser. Let’s check each of them in detail.

Domain name mismatch

Usually, the secure link fails with bad SSL bad cert error when the domain name does not match the one specified in the SSL certificate. Every certificate provider issues SSL for a particular domain name. And the browser verifies whether the certificate matches the browser URL. If it fails, the website may not be able to prove its identity. As a result, it results in

Error code: SSL_ERROR_BAD_CERT_DOMAIN

Incorrect SSL installation

Likewise, incorrect SSL installation also can trigger browser errors. Here, the website SSL configuration may have the incorrect SSL certificate, missing root certificate, etc.

Browser cache

In many cases, browser cache can also influence the SSL errors. SSL certificates come with a validity period. When this validity ends, websites renew their certificates. However, if the computer’s browser contains the old expired certificate, the website fails to load.

How we fix SSL_ERROR_BAD_CERT_DOMAIN

Let’s move on and see how our Support Engineers fix the SSL certificate and make the website work.

Verify the website name

As the first step, we verify that the website certificate contains the correct domain name. We check the common name and Subject Alternate Name (SAN) of the SSL certificate.

Common name: domain.com
SANs: domain.com, www.domain.com

However, the customer was accessing the website with the URL abc.domain.com. But the SSL certificate of the domain “abc.xxx.com” was not a wildcard SSL. So it supports only the domain name.

Therefore, we asked the customer to correct the website address or get a wildcard SSL certificate for the domain. Using a wildcard SSL allows accessing all the subdomains securely.

Correct SSL configuration

In some cases, the website name and the SSL certificate name matches and still the URL report errors. Then we check the SSL configuration files and verify the correct SSL configuration exists for the domain. Further, we verify the settings via the SSL checker. We confirm that the certificate is a valid one.

The correct results of a sample domain appear as:

Common name: domain.com
SANs: domain.com, www.domain.com, abc.domain.com
Valid from October 15, 2019 to October 16, 2020
Serial Number: 11xxx4918xxxx846 (0xa61xxxd6yyy96)
Signature Algorithm: sha256WithRSAEncryption
Issuer: XXX

Clear browser cache

Even when the SSL certificate name and configuration are correct, still the website may throw errors in the browser. This happens when the browser has a cached copy of the website page.

Therefore, to fix the error, we clear the browser cache.

In the Firefox browser, we do this by clicking on the History >> Click on Clear Browser History >> Time range to clear to Everything and uncheck everything else aside from Cookies, Cache and Offline Website Data >> Clear Now

To clear cache in Google Chrome, we Click More tools >> Clear browsing data. Then we choose a time range. We check the boxes next to “Cookies and other site data” and “Cached images and files.” Finally, click Clear data.

[Are you struggling with SSL errors? We’ll fix it right away.]

Conclusion

To sum up, SSL_ERROR_BAD_CERT_DOMAIN happens mainly due to domain name mismatch, incorrect SSL configuration, etc. Today, we saw the top 3 fixes recommended by our Support Engineers form making SSL websites work.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = «owonCMyG5nEQ0aD71QM»;

Hi!

Context

I try to run two nginx docker container behind nginx-proxy. One is shipping example.com another one ships foo.example.com. I use this project to run with https.

The problem

I open https://example.com in the browser and all seems fine. I open https://foo.example.com in the browser an get a error with the following message:

foo.example.com uses an invalid security certificate. 
The certificate is only valid for example.com. 
Error code: SSL_ERROR_BAD_CERT_DOMAIN

This is my docker compose file:

version: '2'

services:
  nginx-proxy:
    image: jwilder/nginx-proxy
    container_name: nginx-proxy
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - conf:/etc/nginx/conf.d
      - vhost:/etc/nginx/vhost.d
      - html:/usr/share/nginx/html
      - dhparam:/etc/nginx/dhparam
      - certs:/etc/nginx/certs:ro
      - /var/run/docker.sock:/tmp/docker.sock:ro

  letsencrypt:
    image: jrcs/letsencrypt-nginx-proxy-companion
    container_name: nginx-proxy-le
    depends_on:
      - nginx-proxy
    volumes_from:
      - nginx-proxy
    volumes:
      - certs:/etc/nginx/certs:rw
      - /var/run/docker.sock:/var/run/docker.sock:ro

################################################################################
# websites
################################################################################

  example.com:
    image: nginx:latest
    container_name: example.com
    environment:
      VIRTUAL_HOST: example.com
      LETSENCRYPT_HOST:example.com
      LETSENCRYPT_EMAIL: mail@example.com
    depends_on:
      - letsencrypt
      - nginx-proxy

  foo.example.com:
    image: nginx:latest
    container_name: foo.example.com
    environment:
      VIRTUAL_HOST: foo.example.com
      LETSENCRYPT_HOST: foo.example.com
      LETSENCRYPT_EMAIL: mail@example.com
    depends_on:
      - letsencrypt
      - nginx-proxy

volumes:
  conf:
  vhost:
  html:
  dhparam:
  certs:

Has somebody a idea what I can do to ship both sites with working https?
Thank you 🙂

  • MiniTool

  • MiniTool News Center

  • How to Fix SSL_ERROR_BAD_CERT_DOMAIN? Try These Methods

By Sonya | Follow |
Last Updated November 28, 2022

google search

What should you do if you are facing error code SSL_ERROR_BAD_CERT_DOMAIN? Why does this error appear and how to fix it? If you want to find the answers, then you should read this post carefully. In this post, MiniTool has offered you multiple efficient methods for you.

As part of the security standard, most browsers recommend accessing the website via https://links. This will encrypt the data transfer between the browser and the webserver. But, when there is something wrong with the SSL certificate, it will display an error in the browser — Error code: SSL_ERROR_BAD_CERT_DOMAIN.

Then why does error code SSL_ERROR_BAD_CERT_DOMAIN appear? There are some causes listed below:

  • Domain name mismatch
  • Incorrect SSL installation
  • Browser cache

So how to fix error code SSL_ERROR_BAD_CERT_DOMAIN? Try the methods mentioned below.

Method 1: Make Sure That The Website Address Is Correct

First of all, you should make sure that the website you want to visit is entered correctly in the address bar. Some users reported that error code SSL_ERROR_BAD_CERT_DOMAIN appeared after mistaking HTTP websites for HTTPS.

Therefore, you should check your address bar and remove the “S” from HTTPS. For example, if the website is https://instance.com, modify it to http://instance.com.

However, even if you can visit and browse websites using this method, remember that HTTP websites are no longer considered secure. If you are the owner of the website, please switch to HTTPS and obtain an SSL certificate, otherwise, you will lose a lot of potential traffic.

If this method cannot fix error code SSL_ERROR_BAD_CERT_DOMAIN, then try the next method below.

Method 2: Clear Browser Cache

If you are sure that the SSL certificate is configured correctly, the problem may be resolved, but your browser is still displaying a cached copy of the homepage.

In this case, you should try to clear the browser’s cookies and cache. Because Firefox is most likely to experience the SSL_ERROR_BAD_CERT_DOMAIN error, here is a quick guide on how to clear the cookies and cache of the Firefox browser:

Step 1: Open Firefox, click the Action button at the top right corner to choose Library.

choose Library

Step 2: Click History and then click Clear Recent History….

Step 3: Set Time range to clear to Everything, and then check the box next to Cookies, Cache, and Offline Website Data. Click OK to clear all selected items.

clear browser cache

Step 4: Wait until the process is completed, then restart Firefox to check if the error is fixed.

Related post: How to Clear Cache for One Site Chrome, Firefox, Edge, Safari

Method 3: Make Sure That the SSL Certificate Is Valid

The last method you can try is to make sure that the SSL certificate is valid. Here is the tutorial:

Step 1: Click Add Exception… at the bottom when the SSL_ERROR_BAD_CERT_DOMAIN appears.

click Add Exception…

Step 2: Click Get Certificate to quickly understand the problems of the SSL certificate identification

Step 3: Click View to know more detailed information, and then you can know whether this problem appears because the SSL certificate has expired.

If the website is yours, make sure to configure SSL certificates for both www and non-www domains. For example, if a user tries to access your website by manually typing https://www.instance.com, but only has your certificate configured for instance.com, he will see an SSL_ERROR_BAD_CERT_DOMAIN error. In this case, you should add both domains to the certificate.

Related post: How to Fix the SSL_ERROR_RX_RECORD_TOO_LONG Error in Firefox

Bottom Line

To sum up, error code SSL_ERROR_BAD_CERT_DOMAIN can be triggered by several causes, but luckily, you can try the methods mentioned above to fix it easily.

About The Author

Sonya

Position: Columnist

Author Sonya has been engaged in editing for a long time and likes to share useful methods to get rid of the common problems of Windows computers, such as Windows Update error. And she aims to help more people to protect their data. What’s more, she offers some useful ways to convert audio and video file formats. By the way, she likes to travel, watch movies and listen to music.

СОВЕТУЕМ: Нажмите здесь, чтобы исправить ошибки Windows и оптимизировать производительность системы

Некоторые пользователи сообщают, что им запрещено открывать свой собственный (или другой) сайт, зашифрованный по протоколу SSL, сообщением об ошибке SSL_ERROR_BAD_CERT_DOMAIN . Эта проблема обычно возникает, если есть какие-то проблемы с настройкой SSL-сертификата сайта, который вы посещаете. Браузер отобразит эту конкретную ошибку, чтобы указать, что сертификат SSL не предназначен для посещаемого вами домена. В большинстве случаев об этой ошибке сообщается в Firefox.

Ошибка SSL_ERROR_BAD_CERT_DOMAIN

Это хорошо известная проблема, возникшая с тех пор, как веб-сайты начали переходить на HTTPS и SSL-сертификаты. Следуя инфраструктуре криптографии с открытым ключом, пользователь SSL должен установить сертификат SSL на веб-сайте, для которого он был выпущен.

Имея это в виду, вот несколько сценариев, которые могут привести к появлению этой проблемы:

  • Неправильная конфигурация SSL со стороны администратора. В большинстве случаев проблема возникает из-за того, что администратор веб-сайта ошибочно установил сертификат SSL на другое доменное имя, отличное от того, для которого оно предназначалось.
  • Неверный адрес веб-сайта — эта конкретная ошибка, как известно, возникает, если пользователь вручную вводит адрес как HTTPS (Hyper Text Transfer Protocol Secure), когда на самом деле веб-сайт все еще HTTP .
  • Неправильная установка SSL-сертификата. Эта проблема также может возникать, если имеется неудачная или неполная установка SSL, которая была неожиданно прервана или остановлена.
  • Кэш браузера отображает ошибку — возможно, что ошибка была устранена с тех пор, но ваш браузер все еще отображает ошибку, потому что он загружает кэшированную версию домашней страницы.

Если вы в настоящее время боретесь с той же проблемой, эта статья предоставит вам некоторые шаги по устранению неполадок. Ниже представлен набор методов, которые другие пользователи в аналогичной ситуации использовали для решения проблемы. Давай начнем!

Способ 1: убедитесь, что адрес сайта правильный

Прежде всего, давайте сначала убедимся, что веб-сайт, к которому вы пытаетесь получить доступ, правильно введен в адресную строку. Несколько пользователей сообщили, что эта ошибка произошла от них после того, как они приняли HTTP-сайт за HTTPS.

Имея это в виду, взгляните на свою адресную строку и удалите ‘S’ из HTTPS. Например, если веб-сайт //example.com, измените его на //example.com.

Но даже если этот метод позволяет вам посещать и просматривать веб-сайты, имейте в виду, что веб-сайты HTTP больше не считаются безопасными. Если ваш сайт принадлежит вам, переключитесь на HTTPS и получите сертификат SSL, в противном случае вы потеряете много потенциального трафика.

Если метод неприменим к вашей конкретной ситуации, перейдите к следующему способу ниже.

Способ 2: очистить историю браузера, файлы cookie и кэш

Если вы уверены, что сертификат SSL настроен правильно, возможно, проблема с тех пор была решена, но ваш браузер по-прежнему отображает кэшированную копию домашней страницы.

В этом случае решение состоит в том, чтобы очистить куки и кеш вашего браузера. Поскольку в Firefox возникает ошибка SL_ERROR_BAD_CERT_DOMAIN, ниже приведено краткое руководство по очистке файлов cookie и кэша браузера Firefox :

  1. Откройте Firefox, нажмите кнопку « Действие» (в верхнем правом углу) и перейдите в « Библиотеку».Кнопка действия> Библиотека
  2. Затем перейдите к истории и нажмите Очистить историю браузера.История> Очистить недавнюю историю
  3. В окне «Очистить недавнюю историю» установите временной диапазон, чтобы очистить « Все» и снять все остальное, кроме файлов «cookie», кэш-памяти и данных автономного веб-сайта.
  4. Нажмите кнопку « Очистить сейчас», чтобы очистить все выбранные элементы. Очистка файлов cookie, кэша и данных офлайн-сайта
  5. После завершения процесса перезапустите браузер Firefox и посмотрите, была ли проблема решена.

Способ 3. Убедитесь, что сертификат SSL действителен

Независимо от того, является ли это вашим собственным веб-сайтом или нет, вы можете использовать Firefox для получения сертификата и просмотра важных сведений, таких как издатель сертификата и срок действия. Это поможет вам определить, возникает ли ошибка SSL_ERROR_BAD_CERT_DOMAIN из-за истекшего сертификата SSL.

Чтобы проверить информацию о сертификате, нажмите на ссылку внизу с надписью «Я понимаю риски». Затем нажмите Добавить исключение> Получить сертификат . Затем вы получите краткое изложение проблем, указанных в SSL-сертификате.

Проблемы с сертификатом SSL

Вы можете копать еще глубже, нажав кнопку Просмотр . На следующем экране вы можете увидеть срок действия и определить, возникла ли проблема из-за истечения срока действия SSL-сертификата.

Истек срок действия SSL-сертификата

Надеемся, что эти исследования помогли вам выяснить источник сообщения об ошибке.

Если веб-сайт принадлежит вам, убедитесь, что вы настроили свой SSL-сертификат для доменов www и non-www. Например, если пользователь пытается получить доступ к вашему веб-сайту, вручную введя //www.example.com, но ваш сертификат настроен только для example.com, он увидит ошибку SSL_ERROR_BAD_CERT_DOMAIN . В этом случае решение заключается в добавлении обоих доменов к сертификату — www.example.com и example.com.

В случае, если вы не управляете веб-сайтом и вы убедились (используя описанные выше методы), что вы правильно заходите на сайт, обратитесь к администратору веб-сайта и попросите их изучить проблему.

Иногда не удается открыть сайт HTTPS из-за ошибки SSL_ERROR_BAD_CERT_DOMAIN, которая часто встречается в Firefox. Обычно она указывает на проблемы с настройками SSL-сертификата на сайте.

Содержание

  • 1 Чем вызвана ошибка?
  • 2 Проверка адреса сайта
  • 3 Очистка журнала посещений
  • 4 Проверка сертификата

Чем вызвана ошибка?

Проблема существует с тех пор, когда сайты начали переходить на протокол HTTPS. После создания инфраструктуры открытых ключей пользователь должен установить сертификат SSL на сайт, для которого он был выдан.

Вот несколько причин, из-за которых можно столкнуться с ошибкой SSL_ERROR_BAD_CERT_DOMAIN:

  1. Неправильная настройка SSL администратором. Это самая распространенная причина, когда администратор ошибочно установил сертификат SSL на другое доменное имя.
  2. Неправильно введен адрес сайта. Проблема возникает, если пользователь вручную вводит адрес, указывая протокол HTTPS, когда на самом деле он еще находится на HTTP.
  3. Неполная установка сертификата, которая была неожиданно прервана.
  4. Повреждены кэшированные файлы браузера.

Проверка адреса сайта

Если столкнулись с ошибкой SSL_ERROR_BAD_CERT_DOMAIN, в первую очередь убедитесь, что адрес веб-страницы правильно набран в адресной строке. Когда при наборе доменного имени в адресной строке автоматически проставляется полный адрес, удалите букву «S» из HTTPS.

Если это ваш собственный ресурс, переключитесь на протокол HTTPS и получите SSL-сертификат, иначе потеряете много потенциального трафика. Если этот метод не применим, перейдите к следующему шагу.

Очистка журнала посещений

Иногда исправить ошибку SSL_ERROR_BAD_CERT_DOMAIN удается путем очистки cookie и кэша браузера Firefox.

Щелкните на значок библиотеки в правом верхнем углу. Затем перейдите в пункт Журнал – Удалить историю.

Щелкните на выпадающий список и установите значение временного диапазона на «Все». Снимите все флажки, кроме файлов куки, кэша и активных сеансов. Нажмите на кнопку «Удалить сейчас» и дождитесь завершения процесса. После перезагрузите Firefox.

Проверка сертификата

В Firefox можно просмотреть сведения о сертификате, включая эмитент и дату истечения срока действия. Таким образом, можно узнать, не связана ли ошибка с истечением срока его действия.

При отображении сообщения с кодом SSL_ERROR_BAD_CERT_DOMAIN нажмите на кнопку «Добавить исключение», затем «Получить сертификат». Отобразится краткое описание неисправностей, выявленных браузером.

Нажмите на кнопку «Просмотреть», чтобы узнать сведения и определить, возникла ли проблема из-за того, что срок его действия истек.

Понравилась статья? Поделить с друзьями:
  • Ssl error anaconda
  • Ssl error access denied alert как исправить firefox
  • Ssl error 14094416
  • Ssl error 0x80090327 при обработке сертификата произошла неизвестная ошибка
  • Ssl error 0x80090308