Failed to redirect for (my domain)

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. |, so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:

I ran this command: certbot --apache -d

It produced this output:Saving debug log to /var/log/letsencrypt/letsencrypt.log
Requesting a certificate for

Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/
Key is saved at: /etc/letsencrypt/live/
This certificate expires on 2023-04-04.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.

Deploying certificate

We were unable to find a vhost with a ServerName or Address of
Which virtual host would you like to choose?

1: wordpress.conf | 45-56-77-23.ip.linode | | Enabled
2: wordpress-le-ssl.conf | 45-56-77-23.ip.linode | HTTPS | Enabled

Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2
Successfully deployed certificate for to /etc/apache2/sites-enabled/wordpress-le-ssl.conf
Failed redirect for
Unable to set the redirect enhancement for


  • The certificate was saved, but could not be installed (installer: apache). After fixing the error shown below, try installing it again by running:
    certbot install --cert-name

Unable to find corresponding HTTP vhost; Unable to create one as intended addresses conflict; Current configuration does not support automated redirection
Ask for help or search for solutions at See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.

My web server is (include version): Apache2

The operating system my web server runs on is (include version): Ubuntu 22.04.1

My hosting provider, if applicable, is: Linode

I can login to a root shell on my machine (yes or no, or I don't know): Yes

I'm using a control panel to manage my site (no, or provide the name and version of the control panel):
The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): certbot 1.21.0

What's the output of:

sudo apachectl -t -D DUMP_VHOSTS

VirtualHost configuration:
*:443 (/etc/apache2/sites-enabled/wordpress-le-ssl.conf:2)
*:80 (/etc/apache2/sites-enabled/wordpress.conf:6)

I'm not sure why Certbot is complaining. I'm not super familiar with this part of the Apache plugin.

What you might try is to:

  1. Open /etc/apache2/sites-enabled/wordpress-le-ssl.conf and /etc/apache2/sites-enabled/wordpress.conf.

  2. In both of those files, within the <VirtualHost> tags, replace, or add if it is missing, the following:


    and save the files.

  3. Try certbot install --cert-name --apache again.


You're amazing! couldn't remember where the ServerName stuff was(new to all this). That worked:
Deploying certificate
Successfully deployed certificate for to /etc/apache2/sites-enabled/wordpress-le-ssl.conf


Ah, it looks like you might need to also run this as well to make it try add the redirection again:

sudo certbot enhance --redirect --cert-name --apache

It looks like that worked but I'm still not redirecting to https. I tried entering it manually and I got a "your connection is not private" screen

1 Like

Could you show me the contents of this file?


We will also need to re-issue your certificate to include the www subdomain because it doesn't at the moment. That causes the warning screen. You can do that with:

certbot --apache --cert-name -d -d --force-renewal
<Directory /var/www/wordpress/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/wordpress/
    ErrorLog /var/log/apache2/wordpress/error.log
    CustomLog /var/log/apache2/wordpress/access.log combined
    <files xmlrpc.php>
    order allow,deny
    deny from all
RewriteEngine on
RewriteCond %{SERVER_NAME}
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

Great, get rid of this line and then:

systemctl reload apache2

reloaded no errors.

1 Like

Looks like everything is working now.


Oh yeah! the redirect is working Thank you so much for your time! Really want to learn this stuff :pray:


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.