Cloudflare Tunnel Domain

Hey all, quick question. I setup a Cloudflare tunnel to access a server running on my Raspberry Pi. It's all working well and good, except for whatever reason I can only access it at https://domain.com, and not "www.domain.com" or "https://www.domain.com". The nameservers for the domain are correct and I have a CNAME record for www pointing to domain.com, so I'm not sure exactly why this isn't working as expected. Any help would be greatly appreciated!
6 Replies
DaniFoldi
DaniFoldi•3w ago
Hey :meowwave: The CNAME record will make the domain resolve to the same IP, so it will reach the same server (Cloudflare in this case), but for tunnels, you need to tell Cloudflare that www.domain.com should also be routed to your tunnel. You can add it as an additional hostname to the same application (up to 5 iirc) and it should start working 💯
danielgamerking
danielgamerkingOP•3w ago
Would you be able to elaborate for me? I’m a little new to the cloudflare dashboard and such. Do I change this in the tunnel settings or the domain records?
DaniFoldi
DaniFoldi•3w ago
In the tunnel settings, look for "Public hostname" ah I was wrong you can't add other hostnames to this - so you'll need to add another public hostname as www.domain.com, just like you did the first one
DaniFoldi
DaniFoldi•3w ago
No description
DaniFoldi
DaniFoldi•3w ago
you can but not under the same entry
danielgamerking
danielgamerkingOP•3w ago
Alright cool I’ll give that a try Cheers @Dani

Did you find this page helpful?