大网数据广告活动
服务器运维问答

How can SSL work with "subdomain" but not "subdomain.subdomain.domain.com"

· 52CE 我爱测

I'm investigating an SSL setup and Chrome says the cert was issues to, subdomain.subdomain.domain.com but if I visit that URL I get the "Cert Invalid" warning". Yet, if I visit "subdomain" directly, the cert is accepted. I'm not …

问题原文

原帖链接 · FreeSoftwareServers · CC BY-SA 4.0

I'm investigating an SSL setup and Chrome says the cert was issues to, subdomain.subdomain.domain.com but if I visit that URL I get the "Cert Invalid" warning". Yet, if I visit "subdomain" directly, the cert is accepted. I'm not 100% how you even setup a site to not have a ".com/org" etc let alone get SSL to work in this sense. Does anybody have any ideas/experience with how this might be setup/possible?

已采纳解答

原帖链接 · Maxx Flow · CC BY-SA 4.0

subdomain.subdomain.domain.com is a little bit confusing. Unifying might help for explanation:

A subdomain is every part left of the most right dot. Only the most right part (com) is no subdomain. It is a Top Level Domain (TLD).

Terminology:

subsubdomain.subdomain.domain.com
       |         |        |    |
       |         |        |     \---> TLD: Top Level Domain
       |         |         \--------> SLD: 2nd/Second Level Domain
       |          \----------------->      3rd/Third Level Domain
        \--------------------------->      4th/Fourth Level Domain

Every certificate is issued for only one CN (Common Name).

In case the CN is the 3rd Level Domain subdomain.domain.com, Chrome will work only with this domain without errors.

Every additional subdomain needs to be added as Alternativ Name. Otherwise you will get an error. A common usecase is the www. subdomain which is added as Alternativ Name.

Multiple domains could be added. It is possible to get a certificate for mydomain.net (CN) with multiple Alternative Names included like: www.mydomain.net, smtp.mydomain.net, my-other-domain.com and www.my-other-domain.com

As mentioned above, Alternative Names do not have to belong to the same "domain".

Wildcard Certificates like *.google.com are another option without propagating "all your domains" to public. Data for every issued certificate will be accessible for everyone. (e.g. %.google%.com resolves google, googlemail, googleapis,...)

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-02-17)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。