New Tunnel setup suffixes unwanted previous domain

Ok. Very new to Cloudflare. I bought 3 domains I want to Tunnel from. I got subdomain1.domain1.com to work, just fine, I wrote myself a bash script, deleted and repeated tunnels, several time at domain1.com.

Now, I’m trying to use that script to create a tunnel on another one of those 3x domains at subdomain2.domain2.com but I get, in the zero-trust-tunnels console,subdomain2.domain2.com.domain1.com. I know, you think I hardcoded domain1.com into my script, thing is, I DIDN’T it’s not there, no reference, so I’m not sure where it’s picking the original/first domain up from. I’m using the following command to associate each domain with the tunnel-subdomain:

cloudflared tunnel route dns <tunnel name/id> <hostname>

Any ideas?

cloudflared tunnel route dns uses the zone/domain that you authorized when you logged in. You authorized domain1.com, so it just sees a name without including it as a subdomain.
You can either log out and login in and select the other domain, or manually create the DNS Record.

1 Like