null
null

Reputation: 1162

Letsencrypt issue: The request message was malformed :: Error creating new authz :: DNS name does not have enough labels

I am trying to setup encryption on AWS EC2 machine. When I run below command

sudo certbot --nginx -d sitename -d www.sitename.com

Then I get above error.

I edited /etc/nginx/conf.d/default.conf file and added below lines

server_name sitename www.sitename.com;

Any idea why am I getting above error.

I am using this tutorial.

https://blog.cloudboost.io/setting-up-an-https-sever-with-node-amazon-ec2-nginx-and-lets-encrypt-46f869159469

Upvotes: 1

Views: 883

Answers (1)

Geige V
Geige V

Reputation: 1449

It is complaining about the suffix in your certificate. The name www.sitename.com is valid but you also have sitename with no suffix. You need to make this sitename.com.

So, you should regenerate your certificate with something like

sudo certbot --nginx -d sitename.com -d www.sitename.com

Upvotes: 2

Related Questions