Let's Encrypt on password protected domains/subdomains

Hello,

I have installed Let’s Encrypt in my WHM panel and it is doing its job.
My issue comes with some sub domains that I restrict the access with .htaccess file.
The htaccess does not let any IP outside a specified list to load the sub domain content and I think this is the reason why my SSL certificate is not being renew in this cases.

Can anyone help me how to solve this issue?
In my case I can white list the IP that letsencrypt is trying the test my sub domains, but I don’t know which they are.

Thank you!

You should simply exclude .well-known from your access control rules.

1 Like

Hello,

Could you please help me what should I add on this rule, because I don’t have knowledge in htaccess rules?

RewriteEngine On
RewriteBase /

ORDER DENY,ALLOW
DENY FROM ALL

ALLOW from xx.xx.xx.xx

Based on that, you could use:

RewriteEngine On
RewriteBase /

SetEnvIf Request_URI "^/\.well-known/"  acme

ORDER DENY,ALLOW
DENY FROM ALL

ALLOW from xx.xx.xx.xx
Allow from env=acme
2 Likes

Thank you, I would try this code and see if it works.

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