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

Wildcard certificate with prefix

· 52CE 我爱测

I am wondering if it's possible to create a wildcard certificate with a prefix. I know that *.example.com will cover anything at the first level (eg. one.example.com , two.example.com , three-four.example.com , etc), but will not…

问题原文

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

I am wondering if it's possible to create a wildcard certificate with a prefix.

I know that *.example.com will cover anything at the first level (eg. one.example.com, two.example.com, three-four.example.com, etc), but will not cover another.one.example.com because that's 2 levels.

I need to have a wildcard certificate that recognizes a prefix; so it would be www.*.example.com.

That means, www.one.example.com, www.two.example.com, www.three.example.com, etc would all work correctly.

Is this possible, and is there a certificate provider that can do this?

社区高分解答

原帖链接 · Steffen Ullrich · CC BY-SA 4.0

I need to have a wildcard certificate that recognizes a prefix; so it would be www.*.example.com. That means, www.one.example.com, www.two.example.com, www.three.example.com, etc would all work correctly.

Is this possible, and is there a certificate provider that can do this?

No. According to the rules of the CA browser forum, RFC2818 and RFC6125 only one wildcard is allowed and only in the leftmost label. Which means there is no www.*.example.com and no *.*.example.com either. You need instead to add all the domains you need in the subject alternative name part of the certificate, but you could have multiple entries and and you can use wildcards, i.e. *.sub1.example.com, *.sub2.example.com etc.

Such certificates with multiple wildcard names are common (look at the certificate for Facebook) which means there are certificate providers which offer these certificates. But they will cost more than others.

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

资料来源与适用范围

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

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

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