Get 50% Discount Offer 26 Days

Recommended Services
Supported Scripts
WordPress
Hubspot
Joomla
Drupal
Wix
Shopify
Magento
Typeo3
How to Fix “This Site Can’t Provide a Secure Connection” Error

An error message (putting security aside) is a confusing and alarming notice for the website owner who says, ” This site can’t provide a secure connection.” 

It’s disruptive if you’re getting it on your MAMP installation because these are normally local testing installation sites.

Usually, it is caused by an issue with your web browser or your site’s SSL certificate. Fortunately, fixing it might be as easy as clearing your browser’s cache. To get better control and reliability, I selected the most suitable, fastest-managed WordPress hosting. For my growing business, it’s been the ideal solution.

What is the “This Site Can’t Provide a Secure Connection” Error?

If a browser has trouble creating a secure https connection, it’ll show a warning, and if that’s the case, it’ll display the ‘This site can’t provide a secure connection’ error indication. In other words, the site either does not provide a certificate or uses an invalid one.

If the certificate can’t be verified, the browser won’t load the site and will present this error message instead, indicating it cannot establish a secure connection with the website you are trying to visit.

Understanding Secure Connections

What is a secure connection? In other terms, in fact, it’s essentially a web address that points to a website that uses HTTPS rather than HTTP. These sites are displayed most of the time using a padlock icon in the address bar to signify that the connection is secure.  

For Chrome browsers, the padlock icon has been replaced with a tune icon in Google Chrome. Clicking on this icon reveals whether your site is secure or not and allows you to access the website confidently.

Although HTTPS is much more secure than HTTP, there are strict requirements in place so that it is compliant. VA valid certificate is one of them.

Sometimes, SSL errors are due to version or cipher mismatches. Learn to fix the ERR_SSL_VERSION_OR_CIPHER_MISMATCH error to maintain a secure connection and prevent these common SSL/TLS issues on your WordPress site.

Error Message Variations

Note that while this error is one thing to know about it, the way it’s presented can vary greatly from browser to browser. But in every case, some variation of secure connections appears in a message from each error.

Common Causes of the Error

Now, just because you see a warning about site security doesn’t necessarily mean the site isn’t secure. While that’s a possibility, it’s more often something more benign. 

Common causes fall into two categories: problems with your web browser and problems with the site or system configuration. The seamless performance and easy management have been great.

If the page is inaccessible for some reason for one browser but shows up fine for the other, that means you have a problem in your browser (likely cached). The issue with either your computer or a site (it must be all browsers) is if the error seems to occur in all browsers.

Let’s explore the most common causes of this error message:

  1. Your Local Environment Doesn’t Have an SSL Certificate
  2. Outdated SSL Caches in the Browser, such as Firefox
  3. Incorrect Time and Date Settings on Your Computer
  4. Rogue Browser Extensions
  5. Overzealous Antivirus Software
  6. Invalid or Expired SSL Certificate that wasn’t able to encrypt data properly

1. Your Local Environment Doesn’t Have an SSL Certificate

If you’re using a local environment such as MAMP, you likely don’t have a certificate for your site. It should be your first troubleshooting step, as it is likely the cause of the issue

Your Local Environment Doesn’t Have an SSL Certificate, This Site Can't Provide a Secure Connection

DevKinsta is a powerful local development tool with everything from automatic SSL certificates for all sites.

2. Outdated SSL Caches in the Browser

It is one of the most common causes. Web browsers save SSL certificates in a cache, similar to how they store other types of data, to speed up the https connection process.

Outdated SSL Caches in the Browser

Additionally, the QUIC protocol makes browsing faster by not requiring verification of the certificate every time you try to visit a site. 

However, if, instead, your SSL certificate changes and the browser is still loading an old cached version, you’ll get this error.

3. Incorrect Time and Date Settings on Your Computer

Authenticating an SSL certificate can get complicated if your computer is set to the wrong time and date. Luckily, this is a simple problem to solve.

This Site Can't Provide a Secure Connection, date and time setting

4. Rogue Browser Extensions

A broken or misbehaving browser extension can also break certificate authentication. It is often due to a coding error that fails to connect using the correct date and time, though it could occasionally be malicious.

Rogue Browser Extensions

5. Overzealous Antivirus Software

In other words, antivirus software that scans your connections for you in real-time can sometimes also come up with this message where it disables or messes up the https connection to the website that you are attempting to visit. It could be as a result of a coding mistake, or just too aggressive settings.

Overzealous Antivirus Software

6. Invalid or Expired SSL Certificate

An expired or invalid SSL certificate on your site can trigger this error. SSL certificates must be renewed regularly. You can go for a suitable VPS. The flexibility and performance are perfect for all needs, whether you need to establish a secure connection or disable potentially harmful elements.

Invalid or Expired SSL Certificate

How to Fix “This Site Can’t Provide a Secure Connection” Error When Using MAMP

As previously mentioned, in a MAMP installation, the most common cause of this issue is the absence of an SSL certificate in your local host environment, preventing a secure connection.

Fortunately, you can create one using OpenSSL, which is a straightforward process and should resolve the error message. These instructions are tailored for macOS users but are also applicable to Linux.

Step 1: Create a Root SSL Certificate

The first step is to generate a root SSL certificate, which allows you to issue additional certificates for your domains, ensuring the security of each URL.

Create a Root SSL Certificate

Open up Terminal app on your computer and type the following command to start.

openssl genrsa -des3 -out rootCA.key 2048 

Command that generates an RSA 2048 key with the file name rootCA.key. An example of how to build the root certificate using this key. Secondly, you’re asked to enter a password; make a note of it, as you’ll be using the key in order to generate certificates later on.

Once that is done, enter the following command to create the root SSL certificate:

openssl req -x509 -new -nodes -key rootCA.key -sha256 -days 1024 -out rootCA.pem 

The rootCA.pem contains the saved certificate. Here, “1024” is the number of days the certificate is good for, which you’re free to change.

Step 2: Trust the Root Certificate

Here is where you want the operating system to trust after you’ve got your root certificate in place. You save time for each future certificate creation as it will ensure that, on default, it will be trusted any future certificate created using it.

Trust the Root Certificate

To proceed, open the Keychain Access app on your macOS and navigate to System and Certificates in the sidebar. Then, go to File > Import Items and select the rootCA.pem the certificate you created in the previous step.

After importing the certificate, double-click it and set the certificate option to Always Trust. With this done, you can now proceed to create an SSL certificate for your domain.

Step 3: Create OpenSSL Configuration Files

OpenSSL Configuration Files

To continue, you would then create a file where you have the settings you would like to have for OpenSSL when creating certificates. First, create a file called server.csr.cnf. It should contain the following:

[req]

default_bits = 2048

prompt = no

default_md = sha256

distinguished_name = dn 

[dn]

C=US

ST=RandomState

L=RandomCity

O=RandomOrganization

OU=RandomOrganizationUnit

[email protected]

CN = localhost

 Save this file, then create another one named v3.ext, and add the following:

authorityKeyIdentifier=keyid,issuer

basicConstraints=CA:FALSE

keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment

subjectAltName = @alt_names 

[alt_names]

DNS.1 = localhost 

Next, you generate a key to sign your domain SSL certificate.

Step 4: Generate a Certificate Key for Localhost

Generate a Certificate Key for Localhost

Head back to the terminal application and enter the following command to create a key for localhost:

openssl req -new -sha256 -nodes -out server.csr -newkey rsa:2048 -keyout server.key -config <( cat server.csr.cnf )

 The key is stored in the server.key file.

Step 5: Create an SSL Certificate for Your Local Domain

Generate a Certificate Key for Localhost

We’re almost done! Now it’s time to generate the SSL certificate for localhost. You can do so by entering the following command in the Terminal application: 

openssl x509 -req -in server.csr -CA rootCA.pem -CAkey rootCA.key -CAcreateserial -out server.crt -days 500 -sha256 -extfile v3.ext 

It will create a certificate file called a server. Crt.

Also, secure site management is impacted by SSH connection problems. Fix SSH connection refused errors and solve SSH access problems to control your server securely.

Step 6: Activate the SSL Certificate for Localhost

Activate the SSL Certificate for Localhost

Finally, copy the server. To your MAMP installation folder, you have created the key and server.crt files from the previous two steps. Now you can’t see the “This site can’t provide a secure connection” error when enabling HTTPS on your local installation of WordPress.

Conclusion

The “This site can’t provide a secure connection” error in MAMP not only prevents access to your site but can also be concerning due to the potential security implications. Fortunately, it’s usually benign and relatively easy to fix. To cope with high traffic, you can choose a Voxfor dedicated server space. The exclusive resources and optimal uptime have been fantastic for my business.

However, this typically means you are missing an SSL certificate on your site (on localhost, this usually means that your browser won’t trust the certificate and that you forgot to install it) or that your browser has a faulty configuration.

Azure DDoS protection is one of the best ways to protect your applications and data. Advanced service that features complete defense against distributed denial-of-service (DDoS) attacks, which can bring even your online operations to a grinding halt.

It’s fixed, and it just involves creating an SSL certificate on localhost with OpenSSL. Once you follow the steps outlined above, you should find that you resolved this error rather quickly so that you can get back to work.

Leave a Reply

Your email address will not be published. Required fields are marked *

Lifetime Solutions:

VPS SSD

Lifetime Hosting

Lifetime Dedicated Servers