I am trying to redirect a domain to my Cloudflare Tunnel’s domain via a CNAME record.
I have a Zero Trust Tunnel running on localhost. On a different domain, I added a CNAME record that points to my tunnel’s URL. When I try to access it, I get the error: “This site can’t provide a secure connection.”
My localhost
is accessible through sub.example.com
, and it works fine. other.domain.com
points to sub.example.com
. Accessing other.domain.com
should redirect me to sub.example.com
(where my localhost is).
If I understand correctly, Cloudflare issues SSL certificates for the main domain, not for the other domains pointing to it. Creating an SSL certificate for the other domains would solve the issue, or using Cloudflare for SaaS, but that is not an option in my case.
My application already issues SSL certificates for any domain, but Cloudflare will not let the HTTP requests go through.
Is there any possible solution to make this work, or should I simply not use Cloudflare? The main purpose for using Cloudflare were the DDoS and bot attack prevention features.