Invalid host in redirect target

My domain is: 466er.org

Switched from letsencrypt to swag on my unraid server

It produced this output:
changed nothing in my portforward settings when trying to get certs, certbot fails. All my subdomains throw this error
"Invalid host in redirect target "my server ip". Only domain names are supported, not IP addresses

My web server is (include version):
multiple
The operating system my web server runs on is (include version):
unraid

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

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

I have no idea what that means.

To me, this error message is pretty clear: your domain is redirecting to an IP address, which is not allowed? This seems to be the case indeed:

osiris@erazer ~ $ curl -LIv www.466er.org
*   Trying 2a00:1450:400e:80e::2013:80...
* Connected to www.466er.org (2a00:1450:400e:80e::2013) port 80 (#0)
> HEAD / HTTP/1.1
> Host: www.466er.org
> User-Agent: curl/7.79.1
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 302 Found
HTTP/1.1 302 Found
< Location: http://47.157.251.104/
Location: http://47.157.251.104/
< Date: Sun, 24 Apr 2022 20:43:33 GMT
Date: Sun, 24 Apr 2022 20:43:33 GMT
< Content-Type: text/html; charset=UTF-8
Content-Type: text/html; charset=UTF-8
< Server: ghs
Server: ghs
< Content-Length: 219
Content-Length: 219
< X-XSS-Protection: 0
X-XSS-Protection: 0
< X-Frame-Options: SAMEORIGIN
X-Frame-Options: SAMEORIGIN

< 
* Connection #0 to host www.466er.org left intact
* Issue another request to this URL: 'http://47.157.251.104/'
*   Trying 47.157.251.104:80...
* connect to 47.157.251.104 port 80 failed: Connection refused
* Failed to connect to 47.157.251.104 port 80 after 268 ms: Connection refused
* Closing connection 1
curl: (7) Failed to connect to 47.157.251.104 port 80 after 268 ms: Connection refused
osiris@erazer ~ $ 

Note that the final error "Connection refused" is not important, the Location header earlier is.

How do you mean, "not sure"? Earlier you said "certbot fails", so you're using Certbot, right? Then it shouldn't be too difficult to just run certbot --version to see the version of Certbot.

2 Likes

This sounds like it's hosted by Google on one of their SaaS platforms.

1 Like

I have no idea what that means.

Edit: Well, I might have a faint idea, but I just don't wanna know :rofl:

2 Likes

It means the A/AAAA records do not point to a server belonging to @Agger96

root@Quake:~# curl -Is www.466er.org | grep Location
Location: http://47.157.251.104/
root@Quake:~# dig a +short www.466er.org
ghs.googlehosted.com.
142.250.185.83
1 Like

Well in the error i get certbot failed to authenticate somedomains

I had originally run letsencrypt in a docker container on my unraid (OS) box. I switched to the SWAG because heard it was more up to date.

version is 1.26.0

Sorry Im not super literate with this kind of stuff. I had everything working before by following a youtube video. Not sure what I messed up this time. Im just trying to figure out how to access my fileserver remotely with swag. Im a cook, not a network technician. I thought this was a support forum is it not?

It is. You added a redirect using a CNAME. You need to add an A record instead.

2 Likes

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