[Cloudflare Tunnel] Two "Published application" from two Tunnels instances, under one domain

Let's say I have 2 locations, "My home" and "My parent's home", and I have created two Tunnels instances. And both location run an application (let's called them my-nas and parents-adguardhome). Is it possible to host those 2 applications under one domain homelab.example.com, i.e.:
https://homelab.example.com/my-nas/xxx
https://homelab.example.com/parents-adguardhome/xxx
https://homelab.example.com/my-nas/xxx
https://homelab.example.com/parents-adguardhome/xxx
I have tried to setup 2 "Published application" from 2 Tunnel instances with the same domain, I got the following error message:
Error: An A, AAAA, or CNAME record with that host already exists. For more details, refer to <https://developers.cloudflare.com/dns/manage-dns-records/troubleshooting/records-with-same-name/>.
Error: An A, AAAA, or CNAME record with that host already exists. For more details, refer to <https://developers.cloudflare.com/dns/manage-dns-records/troubleshooting/records-with-same-name/>.
So does it means two tunnel instances can't share one domain (in this case homelab.example.com) using different path? If so, will this behavior be changed in the future? Or are there any workarounds? Or I will have to use different subdomains for each Tunnel instances?
No description
4 Replies
SuperHelpflare
Feedback
Feedback has been submitted! Thank you :)
sukka
sukkaOP2d ago
After some thought, the current behavior makes some sense: every Tunnel instance will have its own *.cfargotunnel.com CNAME, so it is impossible for one subdomain to have 2 different CNAME records. But I am still interested in if there is any workarounds.
Oscar
Oscar2d ago
The Cloudflare Blog
Where to? Introducing Origin Rules
Origin Rules is a dedicated product for ‘where does this traffic go where it leaves Cloudflare.’ Customers are able to match on an HTTP request using filters and override the host, port, SNI, and the origin a request resolves to.
Cloudflare Docs
Origin Rules settings
The following sections describe the available settings in Origin Rules.
No description
No description
Oscar
Oscar2d ago
Cloudflare Docs
Page Rules
Page Rules trigger one or more actions whenever a certain URL pattern is matched. Page Rules are available in Rules > Page Rules.
Cloudflare Docs
Manage Page Rules
You can manage Page Rules in the Cloudflare dashboard or via API.

Did you find this page helpful?