Getting SSL to work with 2nd level subdomains in Argo Tunnels

I have setup a server in my home for my home automation/hobby projects. Since the NAT condition in my country is really bad, I cannot get a public IP so I can access the machine from where ever I want. So, I thought of using Argo Tunnels to overcome this. Since I want the domain to be used for other stuff, I created the argo tunnel with the address which talks to NGINX on my server. This works fine both with & without SSL.
I have added a CNAME record to * to point to so I can have talk to all my services running on my server using subdomains. I have configured nginx to proxy the subdomain properly. All the subdomains work if used without ssl (ex:, but doesn’t work with ssl due to the certificate they present is for, *,
I tried adding a cloudflare origin certificate generated for & * to argo tunnel config and nginx. But still it’s not working. I have no idea what to do next.

You also need to generate an argo tunnel token and append it to the bottom of the cloudflare origin certificate. You can get this argo tunnel token by running cloudflared login, download the cert.pem file, then simply replace the first two entries with what you have in the origin cert.

Yeah this is what I did. Everything works fine for the domain I created the tunnel for( But the subdomains only work with http. When I use https I get the above mentioned error.

Did you add page rules for 2nd level subdomains? If Not then add and try.

There page rule should be like this: