Skip to content
View Categories

.htaccess Force https exclude .well-known

< 1 min read

If AutoSSL is failing due to being redirected to https://….well-known

then add the following to web-root .htaccess file:

RewriteEngine on
RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge [NC]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$
https://%{HTTP_HOST}/$1 [R=301,L]