let’s say my domain is test.com
I added www and * to A records.
I can access to this https test,com properly
Now I want people to access “sub” as subdomain which will just show everything same as primary domain.
but when I tried to access https on “sub”.test.com it shows “refused to connect”
I tried to add a “sub” in A record then I can access to this subdomain
How can I access to every subdomain without having to add A record for every single subdomain?
because I intend to redirect all of my subdomains to shows everything the same as the primary domain.
so even subdomain ABC not exists I still want to allow accessing to it.
This would lead me to believe your SSL mode is “Flexible” and you do not have SSL enabled on your server and no certificate configured. This is not secure I am afraid. You still need a certificate on your server too and should switch to “Full strict” in this case.
Apart from that, @sdayman basically hit the nail on the head. You cannot enabled proxying for wildcards but, yes, you can have HTTPS on all the desired hosts, however you need to configure them separately. A wildcard wont work.
A do not forget to configure your server for HTTPS