Cannot issue Let’s Encrypt certificate for a domain or a subdomain in Plesk:
PLESK_ERROR: The authorization token is not available at http://sub.example.com/.well-known/acme-challenge/XXXXXXXXXXXXXXX.
To resolve the issue, make it possible to download the token file from the URL above.
The domain or the subdomain name is used as custom Plesk URL at Tools & Settings > Customize Plesk URL:
The name of the domain or subdomain hosted on Plesk server is used at Customize Plesk URL. This is a not supported scenario.
As the description of the Customize Plesk URL feature states, it implies to use domain or subdomain that resolves to the server IP address but is not used for hosting.
If an existing domain or a subdomain is used for a custom Plesk URL a Let’s Encrypt certificate can be issued for this name only at Tools & Settings > SSL/TLS Certificates > Let’s Encrypt as for the Plesk hostname.