Can two subdomains under a top-level domain share one https certificate?

status:

there are two subdomains under a top-level domain, as follows

  • www.abc.com not parsed
  • a.abc.com parsed
  • b.abc.com parsed

excuse me:

a.abc.com has a https security certificate, but b.abc.com does not. Can these two subdomains share a https certificate

Aug.27,2021

to allow two domain names to use the same certificate, you need to apply for a wildcard certificate (* .abc.com), which is very expensive


Yes, but b.abc.com will report that the certificate cannot be trusted. For a certificate to be trustworthy, three conditions need to be met:

  • A certificate issued by a trusted CA (or adding an untrusted CA root certificate to the trusted CA list of an operating system or browser, such as the practice of a ticket website)
  • within the validity period (most certificates are valid within 1-3 years, let's encrypt certificates are valid for 3 months)
  • the domain name address accessed by the browser should match the address issued by the certificate (for example, your certificate is issued to www.example.com , but the address accessed by your browser is www1.example.com , and the browser will also play a warning)

for the third case, if you want multiple domain names to share a certificate, the solution is to use a wildcard certificate (also known as a pan-domain name certificate). You can ask CA to sign a certificate similar to * .example.com (usually not cheap, but let's encrypt supports free, DNS authentication is required. Check the let's encrypt documentation for details), so that all domain names under this domain name are valid.


just buy a wildcard certificate.
Why do you want to do this, please?
there are so many free htts!


Yes, but to buy a wildcard certificate, it is estimated to be a bit expensive. You can apply for each domain name separately, and there is a free

.
Menu