Wildcard subdomain dns and tunneling


I’ve connected a domain to cloudflare successfully and I want to tunnel my web app to all subdomains.

this is the configuration I have on the config.yml

tunnel: xxxxx
credentials-file: xxxx
  - hostname: *.xxxx.com
    service: https://localhost:5101
        noTLSVerify: true

And also this is the dns

I have free account on cloudflare and I have disabled proxy because I read somewhere that wildcard with proxy is not available on free accounts.

I couldn’t make it work though with wildcard only with specific subdomain but I don’t want to add new dns every now and then.
Is there a limitation on free account or am I doing something wrong ?

It used to not be, it is possible now, and you need proxy enabled for tunnels to work.

I believe you’d also need your hostname wrapped in quotes

  - hostname: "*.xxxx.com"

because YAML.

Enable proxy on that record, fix up your config, wait a bit for dns propagation/cache to expire, and see if that does it. If not, please provide the exact error you get.

Yesterday I did a lot of modifications both on config.yml and on dns records.
The version of the config I posted here was indeed wrong and the tunnel couldn’t even run.

I tried the correct combination actually but I guess I didn’t give much time for the dns records.

Thanks a lot for the proxy info, I didn’t know it was necessary for the tunneling or that the wildcard and proxy was available for all plans. Maybe I didn’t try that variation and that’s why it didn’t work yesterday ( I don’t even remember to be honest :stuck_out_tongue: )

Below is the configuration I have now that is working.

url: https://localhost:XXXX
tunnel: XXXX
credentials-file: XXXX.json

1 Like