How to allow HTTPS and configure certificates with a domain that has Hosting type set as Forwarding?




  • Avatar

    How can I make LetsEncrypt work for the forwarding domain?

    When I try to renew the certificate, I get an error, because /.well-known/acme-challenge gets also forwarded. How can this directory be excluded?

  • Avatar
    Ivan Postnikov

    Hello @Atramhasis, it is required to secure the domain where forwarding domain is redirected.

    The directory /.well-known/acme-challenge should not be excluded as its content is required for Let's Encrypt extension to issue the certificate.

    Use this article to resolve the issue.

  • Avatar
    Tristan-Matthieu Robichaud (Edited )

    The gentleman up above is right, this solution simply won't work. The NGINX instructions are wrong regarding Let's Encrypt.

    On Onyx 17.5, we get this when entering this NGINX snippet in Plesk:

    location ^~ /.well-known/acme-challenge/ {
    default_type "text/plain";

    We obtain: Invalid nginx configuration: nginx: [emerg] duplicate location "/.well-known/acme-challenge/" in /var/www/vhosts/system/(DOMAIN NAME)/conf/vhost_nginx.conf:1 nginx: configuration file /etc/nginx/nginx.conf test failed

    For Let's Encrypt to work, the /.well-known/acme-challenge NEEDS to be excluded from the redirection, or else it just redirects to the other site, and the challenge file cannot be read and validated by Let's Encrypt. 

    Could you please provide us with a proper way to exclude that folder from the redirect, so that Let's encrypt can both issue and renew the certificate properly?

    Thanks in advance


  • Avatar
    Ivan Postnikov

    Hello @Tristan,

    The example of such exclusion may be found here.

  • Avatar
    Rodrigo Marcos


    Same problem here.

    Configuración de nginx inválida: nginx: [emerg] duplicate location "/.well-known/acme-challenge/" in /var/www/vhosts/system/ nginx: configuration file /etc/nginx/nginx.conf test failed

    Please, if is possible, edit the article and include specific instructions to solve that error.

    Thank you,


  • Avatar
    Alexandr Redikultsev

    Hi, @Rodrigo Marcos!

    Thank you for the feedback.

    I have double-checked that and can confirm that no additional adjustments for Let's Encrypt are required, all Let's Encrypt directives are already included in case the latest version of the extension is in use. 

    That is the reason of "duplicate location" error.

    I have removed extra directives from the article.

Please sign in to leave a comment.

Have more questions? Submit a request