Handling TLD with german Umlaut (ä, ö, ü) Unable to create certificate?

1. The problem I’m having:

I have a TLD with german Umlaut (ä, ö, ü). I want to redirect this to a url without these umlaut. I see in the logs that caddy receives the request but is unable to create a certificate for this url.

Example: www.digitaler-spürhund.at → www.digitaler-spuerhund.at

It seems, that caddy has some difficulties creating a certificate with that sort of URLs.

2. Error messages and/or full log output:

{"level":"error","ts":1707385513.47711,"logger":"tls.obtain","msg":"will retry","error":"[www.digitaler-spürhund.at] Obtain: [www.xn--digitaler-sprhund-e3b.at] solving challenges: authz https://acme.zerossl.com/v2/DV90/authz/_YdX7UBruddzNZofeMUYlw has unexpected status; order will fail: invalid (order=https://acme.zerossl.com/v2/DV90/order/AFZBF6sngOJyfW_UrDchMA) (ca=https://acme.zerossl.com/v2/DV90)","attempt":6,"retrying_in":600,"elapsed":1237.608749434,"max_duration":2592000}

3. Caddy version:

caddy --version
v2.7.6 h1:w0NymbG2m9PcvKWsrXO6EEkY9Ru4FJK8uQbYcev1p3A=

4. How I installed and ran Caddy:

a. System environment:

b. Command:

PASTE OVER THIS, BETWEEN THE ``` LINES.
Please use the preview pane to ensure it looks nice.

c. Service/unit/compose file:

PASTE OVER THIS, BETWEEN THE ``` LINES.
Please use the preview pane to ensure it looks nice.

d. My complete Caddy config:

{
        # General option
        log {
                level INFO
        }
        email ******@gmail.com
}

www.digitaler-spürhund.at {
        redir https://www.digitaler-spuerhund.com permanent
}

www.digitaler-spuerhund.at {
        redir https://www.digitaler-spuerhund.com permanent
}

www.digitaler-spuerhund.com {
        reverse_proxy www_digitaler_spuerhund_com:80
}

5. Links to relevant resources:

I think you have to use the Punycode representation of the domain, i.e. www.xn--digitaler-sprhund-e3b.at

1 Like

Also, are you sure your DNS is correct? Your domains don’t have the same IP address:

$ dig www.digitaler-spürhund.at                                                                                    

; <<>> DiG 9.18.18-0ubuntu0.22.04.1-Ubuntu <<>> www.digitaler-spürhund.at

;; ANSWER SECTION:
www.digitaler-spürhund.at. 86400 IN	A	213.145.228.16
$ dig www.digitaler-spuerhund.com                                                                                  

; <<>> DiG 9.18.18-0ubuntu0.22.04.1-Ubuntu <<>> www.digitaler-spuerhund.com

;; ANSWER SECTION:
www.digitaler-spuerhund.com. 86400 IN	A	167.86.72.91
1 Like

Ahh!! I played around with the DNS records and obviously I set the TLD right but not for the “www”. Dmn!

Thx for noticing this.

I fixed that. Need some time to settle in.

1 Like

Right! I changed to

#www.digitaler-spürhund.com
www.xn--digitaler-sprhund-e3b.com {
    redir https://www.digitaler-spuerhund.com permanent
}

using Punycode for the URL and now it’s working.

THX!

1 Like