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

Primary domain SSL not working, but wildcard subdomains are working

· 52CE 我爱测

I have a domain through AWS Route 53, the Primary domain was secured via letsencrypt methods, but were not working for any wildcard / subdomains... I tried to redo the cert with the *.example.com domain and the DNS TXT verificati…

问题原文

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

I have a domain through AWS Route 53,

the Primary domain was secured via letsencrypt methods, but were not working for any wildcard / subdomains...

I tried to redo the cert with the *.example.com domain and the DNS TXT verification method in the records. This worked on my endpoints that are GeoDNS routed to their particular instances, i.e. fr.example.com and us.example.com ... but now when I go to my primary domain example.com it now says it's not secured (anymore), and much of my code referencing this primary domain errors because of "invalid cert".

When I load this primary domain via Chrome browser, it reports "Not Secure", and when I click it, to see the Certificate: (Not Secure) and I'll click on that, the details pop up, shows my *.example.com domain, but lit up green saying that domain IS secure. ...?

In Safari it says *.example.com certificate name does not match input.

Any Ideas whats wrong? How can I secure my primary domain with the wildcards being secured as well?

已采纳解答

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

The wildcard name on the certificate only matches the subdomains. To secure the "naked" domain, you need to add that name separately to the Subject Alternative Name list.

Some of the restrictions in regards to wildcard certificates are explained in this post.

Wildcard certificates

The V2 API supports issuing wildcard certificates. To request a wildcard certificate simply send a wildcard DNS identifier in the newOrder request. Under Let’s Encrypt’s policy, wildcard identifiers must be validated by a DNS-01 challenge, so order authorizations corresponding to wildcard identifiers will only offer a DNS-01 challenge. DNS names in certificates may only have a single wildcard character, and it must be the entire leftmost DNS label, for instance *.example.com. A single certificate can have wildcard DNS names for multiple base domains, and can also mix in non-wildcard names.

Orders that contain both a base domain and its wildcard equivalent (e.g. *.example.com and example.com) are valid. In that case, there will be two authorization objects in the order for example.com, one of which represents the wildcard validation and one of which represents the base domain validation. Redundant entries will produce an error. For instance, and order containing both *.example.com and www.example.com would produce an error since the wildcard entry makes the latter redundant.

And in reference to wildcard certificates in general, while wikipedia is not a reliable source to quote, the example given there is accurate.

A single wildcard certificate for https://*.example.com will secure all these subdomains on the https://*.example.com domain:

  • payment.example.com
  • contact.example.com
  • login-secure.example.com
  • www.example.com

...

Because the wildcard only covers one level of subdomains (the asterisk doesn't match full stops), these domains would not be valid for the certificate:

  • test.login.example.com

The "naked" domain is valid when added separately as a Subject Alternative Name:

  • example.com

Note possible exceptions by CAs, for example wildcard-plus cert by DigiCert contains an automatic "Plus" property for the naked domain example.com.

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

资料来源与适用范围

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

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

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