Domains with dash


I’m having issues with obtaining certificates for domains using a dash in the middle of it.

[root@ip158 conf.d]# certbot --nginx --domains
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx
Starting new HTTPS connection (1):
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for
Cleaning up challenges
nginx: [warn] conflicting server name “” on, ignored
nginx: [warn] conflicting server name “” on, ignored
An unexpected error occurred:
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xc2 in position 214: ordinal not in range(128)
Please see the logfiles in /var/log/letsencrypt for more details.
[root@ip158 conf.d]#

I have tried to use the “-d” parameter as well as putting the domain name in “” or in ‘’ but doesn’t work. The nginx configuration doesn’t contain any invalid characters since for the domain names without dash proceeding just fine. Can somebody advise here?



Can you please upload the exact nginx configuration as it exactly exists on your filesystem?

One way is to send it to a pastebin like this:

nginx -T | nc 9999


Indeed, there were some invalid characters due to paste in the domain names. Thanks for pointing out to it. All good now, topic can be closed.


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