Invalid host in redirect target

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g., so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:

I ran this command: sudo certbot --nginx -d, -n -m --agree-tos

It produced this output: Certbot failed to authenticate some domains (authenticator: nginx). The Certificate Authority reported these problems:
Type: connection
Detail: Fetching Invalid host in redirect target "". Only domain names are supported, not IP addresses

Hint: The Certificate Authority failed to verify the temporary nginx configuration changes made by Certbot. Ensure the listed domains point to this nginx server and that it is accessible from the internet.

My web server is (include version): nginx/1.18.0 (Ubuntu)

The operating system my web server runs on is (include version): Ubuntu 20.04.2 LTS

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don't know): Yes

I'm using a control panel to manage my site (no, or provide the name and version of the control panel): No

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): 1.17.0

1 Like

Hi @duanescarlett, and welcome to the LE community forum :slight_smile:

Is your site being redirected to an IP ("")?
[which happens to be the same IP for the names requested]
If so, you should change that - it doesn't need to be redirected anywhere and LE doesn't support redirecting to an IP.
The HTTP challenges are always better handled locally without any redirection.


Thanks for the quick response, I removed the redirect from GoDaddy and it now works like a charm.


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