Why isn't Apache redirecting to HTTPS?

Linode Staff

After following the steps to install an SSL certificate with certbot, Apache still isn't directing to HTTPS. How can I troubleshoot this?

Environment: Apache running on Debian 10

1 Reply

Kudos to one of our customers (Chris) for troubleshooting and identifying the solution here.

The first thing you'll want to do is make sure you're running the following command during the SSL installation process. This should edit your Apache configuration to enable HTTPS:

sudo certbot --apache

If it's still not working after that, you may want to use a debugger to identify the issue. Per certbot's FAQ site, there are actually a few tools available to debug your HTTPS configuration:

https://letsdebug.net/ (by Alex Zorin)

https://check-your-website.server-daten.de/ (by Jürgen Auer)

https://whynopadlock.com/ (by LexiConn)

https://www.ssllabs.com/ssltest/ (by Qualys)

From this Server Fault post, you can also try adding the following line to your virtual host file (located at /etc/apache2/sites-available/):

Redirect permanent "/" "https://www.example.com/"

Lastly, you'll want to make sure your FQDN (Fully Qualified Domain Name) is included in your list of domains for Let's Encrypt.

This other Community post lists the steps necessary to configure a FQDN:

Set up an FQDN for an SSL


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct