vServer with both ipv4 and 6 to connect to ipv6 onyl fritz box

1. The problem I’m having:

Hi, I have a fibre internet connection with a fritz box that only has an publich ipv6 and a example.myfritz.net domain. I want to be able to connect to my home network (mobile phone with ipv4) via a vServer example.com that has both ipv4 and 6 connectivity.

I want to set up a subdomain home.example.com on the vserver with caddy that permanently redirects to example.myfritz.net :

home.rnglr.be {
        reverse_proxy http://example.myfritz.net
}

I can get a succesful connection with example.myfritz.net or the ipv6-adress, but not with home.example.com from an ipv4 connected device. What is wrong?

2. Error messages and/or full log output:

usr@vserver:~$ curl -vL home.example.be
* Host home.example.be:80 was resolved.
* IPv6: 2a01:1:1:1::1
* IPv4: 87.106.1.1
*   Trying [2a01:1:1:1::1]:80...
* Connected to home.example.be (2a01:1:1:1::1) port 80
> GET / HTTP/1.1
> Host: home.example.be
> User-Agent: curl/8.5.0
> Accept: */*
>
< HTTP/1.1 308 Permanent Redirect
< Connection: close
< Location: https://home.example.be/
< Server: Caddy
< Date: Tue, 17 Mar 2026 13:14:25 GMT
< Content-Length: 0
<
* Closing connection
* Clear auth, redirects to port from 80 to 443
* Issue another request to this URL: 'https://home.example.be/'
* Host home.example.be:443 was resolved.
* IPv6: 2a01:1:1:1::1
* IPv4: 87.106.1.1
*   Trying [2a01:1:1:1::1]:443...
* Connected to home.example.be (2a01:1:1:1::1) port 443
* ALPN: curl offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
*  CAfile: /etc/ssl/certs/ca-certificates.crt
*  CApath: /etc/ssl/certs
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256 / X25519 / id-ecPublicKey
* ALPN: server accepted h2
* Server certificate:
*  subject: CN=home.example.be
*  start date: Jan 21 14:11:51 2026 GMT
*  expire date: Apr 21 14:11:50 2026 GMT
*  subjectAltName: host "home.example.be" matched cert's "home.example.be"
*  issuer: C=US; O=Let's Encrypt; CN=E8
*  SSL certificate verify ok.
*   Certificate level 0: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using ecdsa-with-SHA384
*   Certificate level 1: Public key type EC/secp384r1 (384/192 Bits/secBits), signed using sha256WithRSAEncryption
*   Certificate level 2: Public key type RSA (4096/152 Bits/secBits), signed using sha256WithRSAEncryption
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* using HTTP/2
* [HTTP/2] [1] OPENED stream for https://home.example.be/
* [HTTP/2] [1] [:method: GET]
* [HTTP/2] [1] [:scheme: https]
* [HTTP/2] [1] [:authority: home.example.be]
* [HTTP/2] [1] [:path: /]
* [HTTP/2] [1] [user-agent: curl/8.5.0]
* [HTTP/2] [1] [accept: */*]
> GET / HTTP/2
> Host: home.example.be
> User-Agent: curl/8.5.0
> Accept: */*
>
< HTTP/2 502
< alt-svc: h3=":443"; ma=2592000
< server: Caddy
< content-length: 0
< date: Tue, 17 Mar 2026 13:14:28 GMT
<
* Connection #1 to host home.example.be left intact

Domain and ips:

home.example.com
* IPv6: 2a01:1:1:1::1
* IPv4: 87.106.1.1

fritz box
2a01:1:1::f01
example.myfritz.net

3. Caddy version:

caddy -v
v2.8.4 h1:q3pe0wpBj1OcHFZ3n/1nl4V4bxBrYoSoab7rL9BMYNk=

4. How I installed and ran Caddy:

https://dl.cloudsmith.io/public/caddy/stable/deb/debian any-version InRelease

a. System environment:

Ubuntu 24.04.4 LTS (GNU/Linux 6.8.0-106-generic x86_64)

That’s a pretty old version. Please upgrade to the latest.

A redirect is not the same thing as a reverse proxy.

A redirect is something else, i.e. when your server instructs the browser “no, try again at this URL instead” with an HTTP 3xx response.

Caddy’s reverse_proxy can’t connect to your upstream. There’s not really anything special going on here, the issue isn’t with Caddy itself but rather your networking setup between Caddy and your upstream.