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

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3db74-2c3ce.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3db74-2c3ce.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?