As long as I not create any subdomain Letsencrypt is working as expected. When I create a subdomain and try to get a new certificate I get following error: urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response (there is a 403 error only for the subdomain) The authentication file is created but the url doesn't root/or cant access the file for the subdomain. I created a testfile /user/local/ispconfig/interface/acme/.wellknown/acme-challenge/ test.txt When I call the url from the main domain the file is found: http :// www. domain .tld/.well-known/acme-challenge/ test.txt But when I call the url form the subdomain I get a 403 forbidden message. I already updated the https : // git. ispconfig.org/ispconfig/i spconfig3/blob/ stable-3.1/server/conf/ nginx_vhost. conf. master file My subdomain conf is: if ($http_host = "static. domain. com") { rewrite ^(?!/\b(static|stats)\b)/(.*)$ /static/$2 ; }