How to Solve SSL_ERROR_RX_RECORD_TOO_LONG Error?
What Will You Learn in This Guide?
This guide explains the causes of the ssl_error_rx_record_too_long error seen in browsers during an HTTPS connection.
You learn step by step the correct SSL/TLS configuration on Apache and Nginx servers.
Technical Summary
Main Technical Topic: SSL/TLS configuration errors
Basic Problem: Serving unencrypted HTTP content on HTTPS port 443
Scope: Apache, Nginx, browsers, local development environments
This error occurs when the server sends a plain HTTP response while the browser is expecting an SSL handshake.
ssl_error_rx_record_too_long What is it?
This error is especially seen in the Firefox browser.
The browser receives invalid or unencrypted data while waiting for a TLS/SSL handshake.
Common error messages:
- Firefox:
SSL_ERROR_RX_RECORD_TOO_LONG - Chrome:
ERR_SSL_PROTOCOL_ERROR - curl:
unknown protocol
These errors point to the same root problem.
Why Does This SSL Error Occur?
The most common causes are:
- Serving HTTP content on port 443
- SSL module is turned off
- Incorrect certificate or key path
- TLS version mismatch
- Incorrect VirtualHost / server block configuration
In summary: Browser expects HTTPS, server returns HTTP.
Exact Solution Steps for Apache
Enable SSL Module
sudo a2enmod ssl
sudo systemctl restart apache2
- This command enables SSL support in Apache.
HTTPS VirtualHost Configuration
<VirtualHost *:443>
ServerName ornek.com
SSLEngine on
SSLCertificateFile /etc/ssl/certs/genixnode.crt
SSLCertificateKeyFile /etc/ssl/private/genixnode.key
</VirtualHost>
- This configuration defines the use of SSL on port 443.
Open SSL Site Configuration
sudo a2ensite default-ssl.conf
sudo systemctl reload apache2
- This step activates the SSL virtual host.
Exact Solution Steps for Nginx
Is Port 443 Listening with SSL?
server {
listen 443 ssl;
server_name ornek.com;
ssl_certificate /etc/nginx/ssl/genixnode.crt;
ssl_certificate_key /etc/nginx/ssl/genixnode.key;
}
- If the ssl parameter is missing, HTTPS will not work.
Test Configuration
sudo nginx -t
- This command checks the Nginx configuration.
Restart Nginx
sudo systemctl restart nginx
- Changes are applied in this step.
Browser and Native Media Solutions
If the server is configured correctly, the problem may be client-side:
-
Clear browser SSL cache
-
Try it in an incognito tab
-
Use a different browser
- Testing with OpenSSL
openssl s_client -connect ornek.com:443
- This command shows the SSL handshake in detail.
Critical Mistakes to Avoid
1. Error Why is it problematic
Serving HTTP at 443 breaks the SSL handshake VirtualHost HTTPS without SSL does not work Expired certificate Browser rejects Disabling HTTPS creates a Security vulnerability
Frequently Asked Questions (FAQ)
1. Is ERR_SSL_PROTOCOL_ERROR the same error? Yes. It is the equivalent in the Chrome browser.
2. Does a self-signed certificate cause this error? Not directly, but if configured incorrectly.
3. Should I remove the HTTP → HTTPS redirect? No. Forwarding should start from port 80.
4. How do I know if the problem is on the server? If it appears in all browsers, the problem is on the server.
5. SSL is on but the error persists, why? Usually the certificate path or listen 443 ssl is missing.
Result
ssl_error_rx_record_too_long error is a clear indication of incorrect SSL/TLS configuration. It is resolved permanently with the correct port, correct certificate and updated TLS versions.
After completing your SSL configuration, you can use your secure HTTPS connections on the GenixNode infrastructure with peace of mind.

