Symptoms
Let's Encrypt fails to secure the Plesk panel
Invalid port in redirect target. Only ports 80 and 443 are supported, not 8443
The hostname used to access the panel isn't served by Plesk and is absent from the domains list
A redirect is configured in
/var/www/vhosts/default/htdocs/.htaccessRedirect / https://example.com:8443/login_up.php3
Cause
Custom redirects configured for the Plesk hostname prevent Let's Encrypt from accessing the panel.
Resolution
Connect to the server over SSH
Edit
/var/www/vhosts/default/htdocs/.htaccessand remove the redirect line# vi /var/www/vhosts/default/htdocs/.htaccess
Follow this article to make Plesk accessible over a hostname: How to customize the Plesk URL
Issue the Let's Encrypt certificate