I have auto SSL for wildcard domain so when I try to open this domain https://docs.mydomain.app it tries to server the Cloudflare Certificate which is configured only for the domain https://code-docs.mydomain.app as you can see into the config file.
when I disable the code block for the https://code-docs.mydomain.app then https://docs.mydomain.app stars working fine and uses the lets encrypt certificate.
What are the names on the certificate at /etc/caddy/ssl/cfare.crt? And what is your complete config, without redactions? Please don’t redact information, exact values are necessary here or we can’t look into this.
PS: Sorry for hiding the domain info. As this is my client’s server and forum is public so Google will index the client domain name which my client will never want it. That’s why I did that to prevent google to crawl the domain.
I have fixed it anyway. I have created a new certificate that is exclusive to the subdomain only. The previous certificate was the wildcard certificate.
But I still have one question when I included that certificate within the subdomain whether it’s a wildcard it should NOT apply to the other domain. Can you give some insight into this behavior?
I’d probably be able to if I had the exact domain names and certificate information. If you want to send us that privately, we can arrange paid support for your company rather than having to rely on free help in a public forum.