Can't access subdomain through tunnel

I'm looking to use Cloudflare's tunneling feature to host docker services from my local machine. Just to test it out, I tried to use a webpage that's deployed through GitHub pages with a custom domain. All the DNS management has been transferred to Cloudflare. I created a tunnel, linked my service (which works fine using the local ip), and the DNS was updated accordingly. I can't figure out why the subdomain redirects to the main domain every time I try to access it.
5 Replies
Dubz
Dubz2w ago
hosting locally through tunnels is completely different than hosting via pages
9̯ͦ̐9̺͖9͉ͥ
maybe I worded myself poorly. The site is hosted through GitHub pages. but I want to direct traffic from a subdomain of that website to a different ip aka a self hosted service
Dubz
Dubz2w ago
The site is hosted through GitHub pages.
Is that the main site you're referring to, or the subdomain? If you're trying to create a new subdomain, add a DNS entry (A/AAAA record) and point it to the IP of your hosting. If you're trying to use tunnels, I'd suggest using Zero Trust to set it up. It's a slight learning curve, but not nearly as bad as the CLI methods IMO. All managed through the dashboard online once you deploy the cloudflared worker.
9̯ͦ̐9̺͖9͉ͥ
The main site is hosted though GitHub pages. I have already set up a tunnel that points to the service through Zero Trust which created a CNAME entry in the DNS. My issue is that when I try to access the subdomain, I'm redirected to the main domain
Dubz
Dubz2w ago
You'll need to check domain page rules and the server that you're using to host it then. One of them is creating a redirect most likely.

Did you find this page helpful?