Ssl handshake failed error code 525 ошибка

Error analytics

Error Analytics per domain are available within Zone Analytics. Error Analytics allows insight into overall errors by HTTP error code and provides the URLs, source IP addresses, and Cloudflare data centers needed to diagnose and resolve the issue.  Error Analytics are based on a 1% traffic sample.

To view Error Analytics:

  • Log in to the Cloudflare dashboard.
  • Click the appropriate Cloudflare account for your site, then pick the domain.
  • Next, click the Analytics & Logs app icon.
  • Click Add filter, select Edge status code or Origin status code and choose any 5xx error code that you want to diagnose.

Error 500: internal server error

Error 500 generally indicates an issue with your origin web server.  Error establishing database connection is a common HTTP 500 error message generated by your origin web server.  Contact your hosting provider to resolve.

Resolution

Provide details to your hosting provider to assist troubleshooting the issue.

However, if the 500 error contains “cloudflare” or “cloudflare-nginx” in the HTML response body, provide 
Cloudflare support with the following information:

  1. Your domain name
  2. The time and timezone of the 500 error occurrence
  3. The output of www.example.com/cdn-cgi/trace from the browser where the 500 error was observed (replace www.example.com with your actual domain and host name)

Error 502 bad gateway or error 504 gateway timeout

An HTTP 502 or 504 error occurs when Cloudflare is unable to establish contact with your origin web server.

There are two possible causes:

  • (Most common cause) 502/504 from your origin web server
  • 502/504 from Cloudflare

502/504 from your origin web server

Cloudflare returns an Cloudflare-branded HTTP 502 or 504 error when your origin web server responds with a standard HTTP 502 bad gateway or 504 gateway timeout error:

Example of a Cloudflare-branded error 502.

Resolution

Contact your hosting provider to troubleshoot these common causes at your origin web server:

  • Ensure the origin server responds to requests for the hostname and domain within the visitor’s URL that generated the 502 or 504 error.
  • Investigate excessive server loads, crashes, or network failures.
  • Identify applications or services that timed out or were blocked.

502/504 from Cloudflare

A 502 or 504 error originating from Cloudflare appears as follows:

Example of an unbranded error 502.

If the error does not mention “cloudflare,” contact your hosting provider for assistance on 502/504 errors from your origin.

Resolution

To avoid delays processing your inquiry, provide these required details to 
Cloudflare Support:

  1. Time and timezone the issue occurred.
  2. URL that resulted in the HTTP 502 or 504 response (for example: 
    https://www.example.com/images/icons/image1.png
    )
  3. Output from browsing to 
    www.example.com/cdn-cgi/trace
     (replace 
    www.example.com
     with the domain and host name that caused the HTTP 502 or 504 error)

Error 503: service temporarily unavailable

HTTP error 503 occurs when your origin web server is overloaded. There are two possible causes discernible by error message:

  • Error doesn’t contain “cloudflare” or “cloudflare-nginx” in the HTML response body.

Resolution: Contact your hosting provider to verify if they rate limit requests to your origin web server.

  • Error contains “cloudflare” or “cloudflare-nginx” in the HTML response body.

Resolution: A connectivity issue occured in a Cloudflare data center. Provide 
Cloudflare support with the following information:

  1. Your domain name
  2. The time and timezone of the 503 error occurrence
  3. The output of 
    www.example.com/cdn-cgi/trace
     from the browser where the 503 error was observed (replace 
    www.example.com
     with your actual domain and host name)

Error 520: web server returns an unknown error

Error 520 occurs when the origin server returns an empty, unknown, or unexpected response to Cloudflare.

Resolution

Contact your hosting provider or site administrator and request a review of your origin web server error logs for crashes and to check for these common causes:

  • Origin web server application crashes
  • Cloudflare IPs not allowed at your origin
  • Headers exceeding 16 KB (typically due to too many cookies)
  • An empty response from the origin web server that lacks an HTTP status code or response body
  • Missing response headers or origin web server not returning 
    proper HTTP error responses.

    • upstream prematurely closed connection while reading response header from upstream is a common error we may notice in our logs. This indicates the origin web server was having issues which caused Cloudflare to generate 520 errors.

If 520 errors continue after contacting your hosting provider or site administrator, provide the following information to 
Cloudflare Support:

  • Full URL(s) of the resource requested when the error occurred
  • Cloudflare cf-ray from the 520 error message
  • Output from 
    http://www.example.com/cdn-cgi/trace
     (replace 
    www.example.com
     with your hostname and domain where the 520 error occurred)
  • Two 
    HAR files:

    • one with Cloudflare enabled on your website, and
    • the other with 
      Cloudflare temporarily disabled.

Error 521: web server is down

Error 521 occurs when the origin web server refuses connections from Cloudflare. Security solutions at your origin may block legitimate connections from certain 
Cloudflare IP addresses.

The two most common causes of 521 errors are:

  • Offlined origin web server application
  • Blocked Cloudflare requests

Resolution

Contact your site administrator or hosting provider to eliminate these common causes:

  • Ensure your origin web server is responsive
  • Review origin web server error logs to identify web server application crashes or outages.
  • Confirm 
    Cloudflare IP addresses are not blocked or rate limited
  • Allow all 
    Cloudflare IP ranges in your origin web server’s firewall or other security software
  • Confirm that — if you have your SSL/TLS mode set to Full or Full (Strict) — you have installed a Cloudflare Origin Certificate
  • Find additional troubleshooting information on the 
    Cloudflare Community.

Error 522: connection timed out

Error 522 occurs when Cloudflare times out contacting the origin web server. Two different timeouts cause HTTP error 522 depending on when they occur between Cloudflare and the origin web server:

  1. Before a connection is established, the origin web server does not return a SYN+ACK to Cloudflare within 15 seconds of Cloudflare sending a SYN.
  2. After a connection is established, the origin web server doesn’t acknowledge (ACK) Cloudflare’s resource request within 90 seconds.

Resolution

Contact your hosting provider to check the following common causes at your origin web server:

  • (Most common cause) 
    Cloudflare IP addresses are rate limited or blocked in .htaccess, iptables, or firewalls. Confirm your hosting provider allows Cloudflare IP addresses.
  • An overloaded or offline origin web server drops incoming requests.
  • Keepalives are disabled at the origin web server.
  • The origin IP address in your Cloudflare DNS app does not match the IP address currently provisioned to your origin web server by your hosting provider.
  • Packets were dropped at your origin web server.

If you are using Cloudflare Pages, verify that you have a custom domain set up and that your CNAME record is pointed to your custom Pages domain. Instructions on how to set up a custom Pages domain can be found here.

If none of the above leads to a resolution, request the following information from your hosting provider or site administrator before 
contacting Cloudflare support:

  • An 
    MTR or traceroute from your origin web server to a 
    Cloudflare IP address that most commonly connected to your origin web server before the issue occurred. Identify a connecting Cloudflare IP recorded in the origin web server logs.
  • Details from the hosting provider’s investigation such as pertinent logs or conversations with the hosting provider.

Error 523: origin is unreachable

Error 523 occurs when Cloudflare cannot contact your origin web server. This typically occurs when a network device between Cloudflare and the origin web server doesn’t have a route to the origin’s IP address.

Resolution Contact your hosting provider to exclude the following common causes at your origin web server:

  • Confirm the correct origin IP address is listed for A or AAAA records within your Cloudflare DNS app.
  • Troubleshoot Internet routing issues between your origin and Cloudflare, or with the origin itself.

If none of the above leads to a resolution, request the following information from your hosting provider or site administrator:

  • An 
    MTR or traceroute from your origin web server to a 
    Cloudflare IP address that most commonly connected to your origin web server before the issue occurred. Identify a connecting Cloudflare IP from the logs of the origin web server.
  • If you use Railgun (deprecated) via a Cloudflare Hosting Partner, contact your hosting provider to troubleshoot the 523 errors.
  • If you manage your Railgun (deprecated) installation, provide the following:

    • traceroute to your origin web server from your Railgun server.
    • The most recent syslog file from your Railgun server.

Error 524: a timeout occurred

Error 524 indicates that Cloudflare successfully connected to the origin web server, but the origin did not provide an HTTP response before the default 100 second connection timed out. This can happen if the origin server is simply taking too long because it has too much work to do — e.g. a large data query, or because the server is struggling for resources and cannot return any data in time.

Resolution

Here are the options we’d suggest to work around this issue:

  • Implement status polling of large HTTP processes to avoid hitting this error.
  • Contact your hosting provider to exclude the following common causes at your origin web server:
    • A long-running process on the origin web server.
    • An overloaded origin web server.
  • Enterprise customers can increase the 524 timeout up to 6000 seconds using the proxy_read_timeout API endpoint.
  • If you regularly run HTTP requests that take over 100 seconds to complete (for example large data exports), move those processes behind a subdomain not proxied (grey clouded) in the Cloudflare DNS app.
  • If error 524 occurs for a domain using Cloudflare Railgun (deprecated), ensure the lan.timeout is set higher than the default of 30 seconds and restart the railgun service.

Error 525: SSL handshake failed

525 errors indicate that the SSL handshake between Cloudflare and the origin web server failed. Error 525 occurs when these two conditions are true:

  1. The 
    SSL handshake fails between Cloudflare and the origin web server, and
  2. Full or Full (Strict) SSL is set in the Overview tab of your Cloudflare SSL/TLS app.

Resolution

Contact your hosting provider to exclude the following common causes at your origin web server:

  • No valid SSL certificate installed
  • Port 443 (or other custom secure port) is not open
  • No 
    SNI support
  • The cipher suites accepted by Cloudflare does not match the cipher suites supported by the origin web server

Additional checks

  • Check if you have a certificate installed on your origin server. You can check this article for more details on how to run some tests. In case you don’t have any certificate, you can create and install our free Cloudflare origin CA certificate. Using Origin CA certificates allows you to encrypt traffic between Cloudflare and your origin web server.
  • Review the cipher suites your server is using to ensure they match what is supported by Cloudflare.
  • Check your server’s error logs from the timestamps you see 525s to ensure there are errors that could be causing the connection to be reset during the SSL handshake.

Error 526: invalid SSL certificate

Error 526 occurs when these two conditions are true:

  1. Cloudflare cannot validate the SSL certificate at your origin web server, and
  2. Full SSL (Strict) SSL is set in the Overview tab of your Cloudflare SSL/TLS app.

Resolution

Request your server administrator or hosting provider to review the origin web server’s SSL certificates and verify that:

  • Certificate is not expired
  • Certificate is not revoked
  • Certificate is signed by a 
    Certificate Authority (not self-signed)
  • The requested or target domain name and hostname are in the certificate’s Common Name or Subject Alternative Name
  • Your origin web server accepts connections over port SSL port 443
  • Temporarily pause Cloudflare and visit 
    https://www.sslshopper.com/ssl-checker.html#hostname=www.example.com (replace www.example.com with your hostname and domain) to verify no issues exists with the origin SSL certificate:

Screen showing an SSL certificate with no errors.

If the origin server uses a self-signed certificate, configure the domain to use Full SSL instead of Full SSL (Strict). Refer to recommended SSL settings for your origin.


527 Error: Railgun Listener to origin error

A 527 error indicates an interrupted connection between Cloudflare and your origin’s 
Railgun server (rg-listener). Common causes include:

  • Firewall interference
  • Network incidents or packet loss between the Railgun server and Cloudflare

Common causes of 527 errors include:

  • Connection timeouts
  • LAN timeout exceeded
  • Connection refusals
  • TLS/SSL related errors

If contacting Cloudflare support, provide the following information from the Railgun Listener:

  • The full content of the railgun.conf file
  • The full content of the railgun-nat.conf file
  • Railgun log files that detail the observed errors

Connection timeouts

The following Railgun log errors indicate a connection failure between the Railgun Listener and your origin web server:

connection failed 0.0.0.0:443/example.com: dial tcp 0.0.0.0:443: i/o timeout

no response from origin (timeout) 0.0.0.0:80/example.com

Resolution

Contact your hosting provider for assistance to test for connectivity issues between your origin web server and your Railgun Listener. For example, a netcat command tests connectivity when run from the Railgun Listener to the origin web server’s SERVERIP and PORT (80 for HTTP or 443 for HTTPS):

LAN timeout exceeded

The following Railgun Listener log error is generated if the origin web server does not send an HTTP response to the Railgun Listener within the 30 second default timeout:

connection failed 0.0.0.0:443/example.com: dial tcp 0.0.0.0:443: i/o timeout

The time is adjusted by the lan.timeout parameter of the railgun.conf file.

Resolution

Either increase the lan.timeout limit in railgun.conf, or review the web server configuration. Contact your hosting provider to confirm if the origin web server is overloaded.

Connection refusals

The following errors appear in the Railgun logs when requests from the Railgun Listener are refused:

Error getting page: dial tcp 0.0.0.0:80:connection refused

Resolution

Allow the IP of your Railgun Listener at your origin web server’s firewall.

The following errors appear in the Railgun logs if TLS connections fail:

connection failed 0.0.0.0:443/example.com: remote error: handshake failure

connection failed 0.0.0.0:443/example.com: dial tcp 0.0.0.0:443:connection refused

connection failed 127.0.0.1:443/www.example.com: x509: certificate is valid for

example.com, not www.example.com

Resolution

If TLS/SSL errors occur, check the following on the origin web server and ensure that:

  • Port 443 is open
  • An SSL certificate is presented by the origin web server
  • the SAN or Common Name of the origin web server’s SSL certificate contains the requested or target hostname
  • SSL is set to Full or Full (Strict) in the Overview tab of the Cloudflare SSL/TLS app

Error 530

HTTP error 530 is returned with an accompanying 1XXX error displayed. Search for the specific 
1XXX error within the Cloudflare Help Center for troubleshooting information.


  • Gathering information to troubleshoot site issues
  • Contacting Cloudflare Support
  • Customizing Cloudflare error pages
  • MTR/Traceroute Diagnosis and Usage
  • Cloudflare Community Tips

Installing a Secure Sockets Layer (SSL) certificate on your WordPress site enables it to use HTTPS to ensure secure connections. Unfortunately, there are a variety of things that can go wrong in the process of confirming a valid SSL certificate and making a connection between your site’s server and a visitor’s browser.

If you’ve encountered an “SSL Handshake Failed” error message and are confused as to what it means, you’re not alone. It’s a common error that doesn’t tell you much on its own. While this can be a frustrating experience, the good news is that there are simple steps you can take to resolve the issue.

In this post, we’ll explain what the SSL Handshake Failed error is and what causes it. Then we’ll provide you with several methods you can use to fix it.

Let’s get started!

An Introduction to the SSL Handshake

Before we dig deeper into what causes a TLS or SSL handshake failure, it’s helpful to understand what the TLS/SSL handshake is. Secure Sockets Layer (SSL) and Transport Layer Security (TLS) are protocols used to authenticate data transfers between servers and external systems such as browsers.

SSL certificates are needed in order to secure your website using HTTPS. We won’t get too in-depth about the difference between TLS vs SSL since it’s a minor one. The terms are often used interchangeably, so for simplicity’s sake, we’ll use “SSL” to refer to both.

With that out of the way, an SSL handshake is the first step in the process of establishing an HTTPS connection. To authenticate and establish the connection, the user’s browser and the website’s server must go through a series of checks (the handshake), which establish the HTTPS connection parameters.

Let us explain: the client (typically the browser) sends a request for a secure connection to the server. After the request is sent, the server sends a public key to your computer and checks that key against a list of certificates. The computer then generates a key and encrypts it, using the public key sent from the server.

To make a long story short, without the SSL handshake, a secure connection won’t be made. This can pose a significant security risk. Plus, there are a lot of moving parts involved in the process.

That means there are many different opportunities for something to go wrong and cause a handshake failure, or even lead to the “your connection is not private” error, causing visitors to leave.

Confronted with the ‘SSL Handshake Failed’ error? 🤝 Get a grip on how to solve it with these 5 methods ⤵️Click to Tweet

Understanding What Causes SSL Handshake Failures

An SSL Handshake Failure or Error 525 means that the server and browser were unable to establish a secure connection. This can happen for a variety of reasons.

Generally, an Error 525 means that the SSL handshake between a domain using Cloudflare and the origin web server failed:

ssl handshake failed error

However, it’s also important to understand that SSL errors can happen on the client-side or the server-side. Common causes of SSL errors on the client-side include:

  • The wrong date or time on the client device.
  • An error with the browser configuration.
  • A connection that is being intercepted by a third party.

Some server-side causes include:

  • A cipher suite mismatch.
  • A protocol used by the client that isn’t supported by the server.
  • A certificate that is incomplete, invalid, or expired.

Typically, if the SSL handshake fails, the issue can be attributed to something wrong with the website or server and their SSL configurations.

How to Fix the SSL Handshake Failed Error (5 Methods)

There are several potential causes behind the “SSL Handshake Failed” error. So there’s no simple answer when it comes to how you should fix it.

Fortunately, there are a handful of methods you can use to begin exploring potential issues and resolving them one by one. Let’s take a look at five strategies you can use to try and fix the SSL Handshake Failed error.

1. Update Your System Date and Time

Let’s start with one of the more unlikely causes, but one that is incredibly easy to correct if it is the problem: your computer’s clock.

If your system is using the wrong date and time, that may interrupt the SSL handshake. When the system clock is different than the actual time, for example, if it’s set too far into the future, it can interfere with the SSL certificate verification.

Your computer’s clock might have been set incorrectly due to human error or simply due to a glitch in your settings. Whatever the reason, it’s a good idea to check and make sure your system time is correct, and update it if it’s not.

Of course, if your clock is showing the correct information, it’s safe to assume that this isn’t the source of the “SSL Handshake Failed” issue.

2. Check to See If Your SSL Certificate Is Valid

Expiration dates are placed on SSL certificates, to help make sure their validation information remains accurate. Generally, the validity of these certificates lasts for anywhere between six months and two years.

If an SSL certificate is revoked or expired, the browser will detect this and be unable to complete the SSL handshake. If it’s been more than a year or so since you installed an SSL certificate on your website, it might be time to reissue it.

To view the status of your SSL certificate, you can use an SSL certificate checker tool such as the one offered by Qualys:

qualys labs

The SSL Server Test tool on the Qualys website

This tool is both reliable and free to use. All you need to do is input your domain name into the Hostname field, and then click on Submit. Once the checker is done analyzing your site’s SSL configuration, it will present you with some results:

ssl certificate status

The results page of the Qualys SSL checker tool

On this page, you can find out if your certificate is still valid and see if it has been revoked for any reason.

In either case, updating your SSL certificate should resolve the handshake error (and is vital for keeping your site and your WooCommerce store secure).

3. Configure Your Browser for the Latest SSL/TLS Protocol Support

Sometimes the best way to determine the root cause of an issue is by process of elimination. As we mentioned earlier, the SSL handshake failure can often occur due to a browser misconfiguration.

The quickest way to determine whether a particular browser is the problem is to try switching to a different one. This can at least help narrow down the problem. You may also try disabling any plugins and resetting your browser back to its default settings.

Another potential browser-related issue is a protocol mismatch. For example, if the server only supports TLS 1.2, but the browser is only configured for TLS 1.0 or TLS 1.1, there’s no mutually-supported protocol available. This will inevitably lead to an SSL handshake failure.

How you can check to see if this problem is occurring varies based on the browser you’re using. As an example, we’ll look at how the process works in Chrome. First, open your browser and go to Settings > Advanced. This will expand a number of menu options.

Under the System section, click on Open your computer’s proxy settings:

proxy settings

The system settings page in Google Chrome

This will open up a new window. Next, select the Advanced tab. Under the Security section, check to see if the box next to Use TLS 1.2 is selected. If not, check that option:

Fix "ssl handshake failed" error: ssl tls settings

The Internet Properties advanced settings in Windows

It’s also recommended that you uncheck the boxes for SSL 2.0 and SSL 3.0.

The same applies to TLS 1.0 and TLS 1.1 since they are being phased out. When you’re done, click on the OK button, and check to see if the handshake error has been resolved.

Note that if you’re using Apple Safari or Mac OS there isn’t an option to enable or disable SSL protocols. TLS 1.2 is automatically enabled by default. If you’re using Linux, you can refer to the Red Hat guide on TLS hardening.

4. Verify That Your Server Is Properly Configured to Support SNI

It’s also possible that the SSL handshake failure is being caused by improper Server Name Indication (SNI) configuration. The SNI is what enables a web server to securely host several TLS certificates for one IP address.

Each website on a server has its own certificate. However, if the server isn’t SNI-enabled, that can result in an SSL handshake failure, because the server may not know which certificate to present.

There are a few ways to check and see whether a site requires SNI. One option is to use Qualys’ SSL Server Test, which we discussed in the previous section. Input your site’s domain name, and then click on the Submit button.

On the results page, look for a message that reads “This site works only in browsers with SNI support”:

browser sni support

The summary results page of the Qualys SSL checker tool

Another approach for detecting if a server is using SNI is to browse the server names in the ‘ClientHello’ message. This is a more technical process, but it can offer a lot of information.

It involves checking the extended hello header for a ‘server_name’ field, to see if the correct certifications are presented.

If you’re familiar with using tools such as the OpenSSL toolkit and Wireshark, you might find this method preferable. You can use openssl s_client with and without the -servername option:

# without SNI
 $ openssl s_client -connect host:port 

 # use SNI
 $ openssl s_client -connect host:port -servername host

If you get two different certificates with the same name, it means that the SNI is supported and properly configured.

However, if the output in the returned certificates is different, or the call without SNI cannot establish an SSL connection, it indicates that SNI is required but not correctly configured. Resolving this issue may require switching to a dedicated IP address.

5. Make Sure the Cipher Suites Match

If you still haven’t been able to identify the cause of the SSL handshake failure, it might be due to a cipher suite mismatch. In case you’re unfamiliar with the term, ‘cipher suites’ refer to a set of algorithms, including ones for key exchange, bulk encryption, and message authentication code, that can be used for securing SSL and TLS network connections.

If the cipher suites that a server uses don’t support or match what’s used by Cloudflare, that can result in an “SSL Handshake Failed” error.

When it comes to figuring out whether there is a cipher suite mismatch, Qualys’ SSL Server Test proves yet again to be a useful tool.

When you input your domain and click on Submit, you’ll see a summary analysis page. You can find the cipher information under the Cipher Suites section:

qualys cipher suites

The Cipher Suites section in a Qualys SSL report

You can use this page to discover which ciphers and protocols the server supports. You’ll want to look out for any that display the ‘weak’ status. In addition, this section also details the specific algorithms for the cipher suites.

To correct this issue, you can compare the results against what your browser supports by using the Qualys SSL/TLS Capabilities of Your Browser tool. For more extensive information and guidance about cipher suites, we also recommend checking out the ComodoSSLStore guide.

Confused by the ‘SSL Handshake Failed’ error message? This guide explains what it is and, most importantly, 5 ways to fix it 🙌Click to Tweet

Summary

One of the most perplexing yet common types of SSL-related problems is the “SSL Handshake Failed” error. Dealing with this error can be stressful since it has many potential causes, including both client- and server-side issues.

However, there are some reliable solutions you can use to identify the problem and resolve it. Here are five ways you can use to fix the SSL Handshake Failed error:

  1. Update your system date and time.
  2. Check to see if your SSL certificate is valid (and reissue it if necessary).
  3. Configure your browser to support the latest TLS/SSL versions.
  4. Verify that your server is properly configured to support SNI.
  5. Make sure the cipher suites match.

BNAME.RU » Код ошибки HTTP 525 SSL Handshake Failed Cloudflare

Ошибка 525: не удалось установить соединение SSL.

Ошибки 525 часто возникают из-за проблем с конфигурацией исходного веб-сервера. Ошибка 525 возникает, когда выполняются эти два условия:

  • Связывание SSL между Cloudflare и исходным веб-сервером не удается, и
  • Полный или полный (строгий) SSL устанавливается на вкладке «Обзор» вашего приложения Cloudflare SSL / TLS.

Как устранить ошибку 525 SSL handshake failed?

Обратитесь к своему хостинг-провайдеру, чтобы исключить следующие распространенные причины на вашем исходном веб-сервере:

  • Не установлен действующий сертификат SSL
  • Порт 443 (или другой настраиваемый безопасный порт) не открыт
  • Нет поддержки SNI
  • Наборы шифров, принятые Cloudflare, не совпадают с наборами шифров, поддерживаемыми исходным веб-сервером.

Если 525 ошибок возникают периодически, просмотрите журналы ошибок исходного веб-сервера, чтобы определить причину. Настройте Apache для регистрации ошибок mod_ssl. Кроме того, nginx включает ошибки SSL в свой стандартный журнал ошибок, но может потребовать повышения уровня журнала.

Are you looking forward to resolving Error 525 SSL handshake failed?

The error indicates that the SSL handshake between Cloudflare and the origin web server failed.

This problem happens mainly because of an invalid SSL certificate, closed port 445, etc.

At Bobcares, we often get requests from our customers to fix the Error 525 SSL handshake failed as part of our Server Management Services.

Today, let’s have a look for the reason of this error. We’ll also see how our Support Engineers fix this error.

Why Error 525 SSL handshake failed?

The error 525 essentially means the SSL handshake between Cloudflare and the origin web server failed. This inturn causes the error to pop up while accessing the website.

Again, this error occurs on the domain using Cloudflare Full or Full (Strict) SSL mode.

The most common causes of this error are:

  • No valid SSL certificate installed on the website
  • The website is not listening on port 443.
  • The SNI is not supported by the website(sometimes not configured to SNI)
  • The cipher suites that Cloudflare uses do not match what the origin accepts

While accessing the website the error appears as:

error 525 ssl handshake

The major reasons and fixes of this error

At Bobcares, where we have more than a decade of expertise in managing servers, we see many customers face problems with error 525 SSL handshake failed.

Now, let’s see the major reasons for this error and how our Support Engineers fix it.

Invalid certificate

One of the major reasons for this error is due to the website not having a valid SSL certificate.

Therefore, when a customer reports the error, we check for the SSL certificate expiry date. If expired, we install the valid SSL certificate for the domain. Also, we double-check if the website uses the correct certificate.

Port 443

Recently, one of the customers approached us with the same error. On further analyzing, we could trace that the issue was due to closed SSL secure port 443.

We have checked that whether the port 443 was listening or not,  by applying the command follows.

netstat -nltp | grep : 443

We could see that the port was not listening and it was closed. So that we opened the SSL port and that fixed the problem.

SNI

Also, another major cause of the error is the improper configuration of SNI.

Server Name Indication (SNI) allows the server to safely host multiple TLS Certificates for multiple sites, all under a single IP address.

Here, we check and make sure whether the SNI is properly configured on the website. If the SNI is not supported or configured will cause this error to pop up.

If the server is not having SNI, then the website should need a dedicated IP address to avoid this error.

Cipher suites

Similarly, Cipher Suites also can be a cause for the 525 error.

A cipher suite is a set of algorithms that help secure a network connection that uses Transport Layer Security (TLS) or its now-deprecated predecessor Secure Socket Layer (SSL). The set of algorithms that cipher suites usually include: a key exchange algorithm, a bulk encryption algorithm, and a message authentication code (MAC) algorithm.

In certain cases, the cipher suites that the origin server uses do not match with Cloudflare. The cipher suites 115 that Cloudflare accepts 29 and the cipher suites that the origin server supports do not match. Thus, to fix the error, we always ensure that the version of Open SSL supports the cipher suites that Cloudflare support.

[Need assistance to fix Cloudflare error? We’ll help you.]

Conclusion

In short, Error 525 SSL handshake failed to occur mainly due to invalid  SSL certificate, closed 443 port, SNI problem, and so on. Today, we have discussed this error in detail and saw how our Support Engineers fix this error for our customers.

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»;

When the error message “SSL Handshake Failed” often also shown as “Cloudflare 525” is displayed on the screen, the majority of users may be unfamiliar with it. However, the name itself provides a clue as to what the issue may be.

In real life, we often shake hands when finalizing an agreement with someone. The same concept applies to SSL certificates – the SSL handshake is a process that occurs between the user’s device and the web server to establish a secure connection.

Installing an SSL certificate on your WordPress site makes sure that it uses HTTPS to establish a secure connection. However, Due to a variety of reasons things can go wrong while establishing this connection between the website’s server and your browser.

But there is nothing to worry about! The good news is that there are several solutions that you can try to fix it.

In this article, I will guide you through a step-by-step process to resolve the “SSL Handshake Failed” error and get you back to browsing the web safely and securely. Let us get started!


Read: 🚩 What Is SSL? and Everything You Need To Know about it


What is SSL handshake mean?

SSL handshake Failed Error message

SSL handshake Failed Error message

SSL Handshake is a process that happens when you try to access websites using HTTPS. It follows a security protocol establishing a secure connection between your website’s server and the browser.

During this process, the browser and the server exchange a series of messages to agree on a set of encryption rules and generate a unique session key.

When the session key is generated, it is then used to encrypt all the data which is going to be transmitted between the browser and the server.

The handshaking process is crucial because it enables the encryption of data, preventing hackers from intercepting and stealing your sensitive information from the website.


Read: 🚩 The Importance of Protecting Your Sensitive Information


You might also notice that the SSL Handshake failed error message has variations depending on the client application or the server you trying to communicate.

For example, if you are using Cloudflare, the SSL handshake Failed error may appear like this.

Error 525 or SSL handshake Failed error

Error 525 or SSL handshake Failed error

What are the reasons that cause SSL handshake Failed message?

Now that you have learned what an SSL handshake is, you may encounter an error message that says “SSL handshake failed.” This message indicates that your browser and the server were unable to establish a secure connection to communicate with each other.

There can be multiple reasons for SSL handshake failure, whether it occurs on the client side or the server side. However, some of the most common reasons are listed below:

The Client side Causes:

Incorrect system time: If the date, time, or timezone on the device is incorrect, SSL certificates may appear invalid, causing the handshake to fail.

Firewall or proxy interference: Firewalls and proxies may block SSL connections or interfere with the SSL handshake, causing it to fail.

Browser Issues: An outdated browser, may cause the SSL handshake to fail.

Network connectivity issues: Network connectivity issues, such as a weak or unstable internet connection, may cause the SSL handshake to fail.

The Server Side Causes:

Invalid SSL certificate: If the SSL certificate is expired, self-signed, or not issued by a trusted certificate authority, the SSL handshake may fail.

Incompatible SSL/TLS versions: If the client and server cannot agree on a common SSL/TLS version, the handshake may fail.

Server configuration issues: If the server’s SSL configuration is incorrect, the handshake may fail. This can include issues with the cipher suite, protocols, or certificate chain.


As we mentioned earlier, there can be many reasons that could cause an SSL Handshake Failed error. Therefore, it would be challenging to determine how you should proceed to fix the SSL Handshake Failed error.

However, it doesn’t mean that you cannot take any action. There are several methods you can try to identify the potential main cause of the SSL Handshake Failed error and fix them step by step.

Here are the best methods you can try to fix the SSL Handshake Failed error.

  • Check the system date and time and update them
  • Try on Alternate Browsers
  • Check your SSL certificate Authenticity and Validity
  • Check your browser with the latest SSL protocol
  • Check whether the server and browser support the Cipher suites or not.
  • Check whether the server is properly configured to Support SNI or not.

1. Check the system date and time and update them

This is one of the easiest methods that nobody would expect to cause an SSL Handshake Failed error. If your PC’s date and time aren’t well synchronized with the real-time or configured incorrectly, it can cause SSL Handshake Failed error.

An incorrect system time and date can disrupt the SSL handshake if your PC’s or system’s date and time differ from the present or real-time. This is because SSL certificates come with a validity period and exceeding the expiry date will result in an invalid certificate issue.

2. Try on Alternate Browsers

It is also possible that the browser you are using to access the website has some issues. This could be due to your browser settings, a faulty plugin installation, or any other factor. Therefore, to check whether your browser is causing the issue, try switching to an alternate browser.

Let’s suppose that you’re using Google Chrome to access a website and encounter an SSL handshake failed error. However, the same website works fine in an alternative browser, such as Firefox or Brave.

In this case, you can try to reset Google Chrome or whatever browser you were using to its default settings and remove all the installed plugins or extensions.

Afterward, try to connect to your website and enable plugins or extensions one by one to check whether you can connect to the website. This way, you will be able to figure out the exact issue with your browser and fix it.

3. Check your SSL certificate Authenticity and Validity

SSL certificates come with a finite validity period or expiration date to ensure that the validation information remains authentic and accurate. Any issue with the validity information or the exceeding expiry date, the browser will detect will not perform Handshake with the server.

Typically, websites have a validity period of 6 to 12 months for SSL certificates. If it has been past the validity date since you installed the SSL certificate on your website, then it is time to renew or purchase a new SSL license.

One of the easiest methods to check your website’s SSL certificate validity is to use an online tool SSL Checker by Qaulys.

2 How to Fix "SSL Handshake Failed" or "Cloudflare 525" Error?

SSL Server Test

This tool is trusted, reliable, and completely Free to use. The only thing you need to do is to enter your Website’s URL into the “Hostname” section and click on the “Submit” button.

The tool checks your website’s SSL certificates, analyzes them, and shows you the results.

4. Check your browser with the latest SSL protocol

As we have already mentioned, an SSL handshake failure can happen due to multiple reasons. The only effective way to fix this issue is by eliminating the possible causes. And one of the most common reasons for this error is Browser misconfiguration.

We have also suggested that you try connecting to the website using alternate browsers and disabling plugins, but this may not always resolve the issue. There may be browser-related problems that can trigger an SSL Handshake Failure error due to protocol mismatch.

To understand this, consider an example: if the browser you are using only supports TLS 1.1, but your server supports the latest versions of TLS 1.2 and 1.3, then no connection can be established and the result will be an SSL Handshake Failure error.

In this case, you need to update your browser to the latest available version. The new updates generally enable the latest TLS released. However, if it is updated, there are certain things you need to take care of. You must ensure that your browser is properly configured to support the latest TLS version.

To verify this, you can take the help of the same SSL checker tool “Qualys“.

Step 1: Go to ssllabs.com by Qualys.

Step 2: Go to the projects tab.

image 2 How to Fix "SSL Handshake Failed" or "Cloudflare 525" Error?

SSLLabs

Step 3: Click on the SSL client test link.

Step 4: In the ‘Protocol Support’ section, a message will appear telling you whether your browser supports the latest version of TLS or not.

5. Check whether the server and browser support the Cipher suites or not.

Another common reason for getting an SSL handshake failed error is if the client and the server are not following the same Cipher suites or have a Cipher suit mismatch issue.

What is a Cipher suite?

Cipher suites are sets of cryptographic algorithms used to secure network connections. They include encryption, message authentication, and key exchange methods negotiated during SSL/TLS handshake to establish secure connections between a client and server.

You can compare the cipher suites for the both Client and the server, using the same SSL checker tool by Qualys. To do this all you need to do is,

Step 1: Go to SSLLabs.com and Click on Project Tabs.

Step 2: Click on SSL client test.

Step 3: You will be provided with a complete list under the Cipher Suits section.

Step 4: Now, the next thing you need to do is to Open a new tab > Open SSLLabs.com > Click on Project Tabs.

Step 5: Now Click on the SSL Server Test link.

Step 6: Type the Website domain name you were trying to visit and showed the SSL handshake failed error. Followed by clicking on the submit button.

Step 7: Scroll down to see a complete list of Cipher suits the server supports.

Cipher Suites section in a Qualys SSL report

Cipher Suites section in a Qualys SSL report

Now you have to check and verify whether your browser and the server support the same cipher suit or not.

6. Check whether the server is properly configured to Support SNI or not.

An SSL handshake failure error can also be triggered due to misconfigured SNI (Server Name Indication).

An SNI (Server Name Indication) is a TLS protocol extension that enables multiple domains to be served over HTTPS from a single IP address. It works by identifying the requested website’s hostname during the TLS handshake, allowing the server to present the appropriate SSL/TLS certificate.

Each website hosted on a server has its own SSL certificates. But if SNI is not enabled on the server, it can result in an SSL handshake Failed error. It is because the server won’t be able to determine the right certificates.

You can check whether the server has SNI enabled or not by the following two methods:

  • Using the SSL checker tool by Qualys
  • Using OpenSSL toolkit.

Checking if a server is using SNI with the help of the SSL checker tool by Qualys

Just like the steps you followed in the above sections, i.e open Ssllabs.com > Input your domain > click on Submit button.

Summary result section of Qualys SSL checker tool

Summary result section of Qualys SSL checker tool

On the result page, you will find a grade is provided along with the message “This site works only in browsers with SNI support” at the bottom.

Checking if a server is using SNI with the help of the OpenSSL toolkit

1. Open a command prompt or terminal window.

2. Type the following command: openssl s_client -connect servername:443 -servername domainname

Note: Replace “servername” with the name of the server you want to test and “domainname” with the name of the domain you want to test.

3. Press Enter to run the command.

If SNI is enabled, you should see the SSL/TLS certificate details for the domain you specified. If SNI is not enabled, you may see the certificate details for the default domain on the server.

If the command fails to connect, it could be due to a firewall or other network issues, or the server may not support SNI. In such cases, you should contact the server administrator for assistance.


Summary

The SSL handshake is an essential process for securing website connections and protecting sensitive information. A failed SSL handshake can cause connection issues and leave your website vulnerable to attacks.

By understanding the causes and symptoms of SSL handshake errors and implementing the appropriate solutions, you can ensure a secure and reliable website connection for your users.

Additionally, regular maintenance and updates of SSL certificates are crucial to maintaining website security and avoiding SSL handshake errors. It is important to stay vigilant and proactive in maintaining SSL security to protect your website and its users.


Frequently Asked Questions

What causes an SSL handshake error?

The causes of SSL handshake errors are:
1. Incorrect system time
2. Firewall or proxy interference
3. Browser Issues
4. Network connectivity issues
5. Invalid SSL certificate
6. Incompatible SSL/TLS versions
7. Server configuration issues

What is an SSL handshake failure?

SSL handshake failure is an error that occurs when a browser fails to establish a secure connection with a website. This can happen due to reasons like expired SSL certificates, incorrect system time and date, or server configuration issues.

What is the full form of SSL handshake?

The full form of SSL handshake is “Secure Sockets Layer handshake”. This is the latest technology that helps to ensure in any data transmitted between the web server and browser is encrypted, making it more difficult for unauthorized parties to intercept or steal sensitive information.


Понравилась статья? Поделить с друзьями:
  • Ssl budgetplan minfin ru ошибка
  • Ssh2 msg unimplemented packet ошибка
  • Ssh сетевая ошибка в соединении отказано
  • Ssf ошибка внешний продукт обеспечения безопасности не найден
  • Sse exe ошибка приложения 0xc000007b