How generate CSR for wildcard multidomain certificates - ssl

I want to buy a multidomain wildcard certificate for 2 domains: *.domain1.org and *.domain2.org
How i should generate the CSR? Because I have tried to generate it using as common name *.domain1.org but the website where I try to buy not accept wildcard in the common name. In addition, if I only specify one domain in common name, it would be valid for the other domain?

For a Multi Domain wildcard certificate the CSR is to be generated for a non wildcard domain name (like www.domain.com or domain.com).
While completing your order, you have to specify the Wildcard domain names in the Additional domain names list as follows:
*.domain1.com
*.domain2.com

You will need one certificate for each domain. You can't place the wildcard where the domain should be. *.domain1.org and *.domain2.org will work. But *.org will not.

Related

NET::ERR_CERT_COMMON_NAME_INVALID - www to non-www with ssl and sub-domains [duplicate]

I bought a wildcard certificate for *.example.com. Now, I have to secure *.subdomain.example.com. Is it possible to create a sub-certificate for my wildcard-certificate?
If it is, how I can do this?
No, it is not possible. A wildcard inside a name only reflects a single label and the wildcard can only be leftmost. Thus *.*.example.org or www.*.example.org are not possible. And *.example.org will neither match example.org nor www.subdomain.example.org, only subdomain.example.org.
But you can have multiple wildcard names inside the same certificate, that is you can have *.example.org and *.subdomain.example.org inside the same certificate.
It is impossible to secure multi-level subdomains with a single wildcard certificate. If wildcard certificate issued for *.mydomain.tld, so it can secure only first-level subdomains of *.mydomain.com.
To secure your second-level subdomains, you have two choices.
Purchase another wildcard certificate for *.sub1.mydomain.tld. In that case, you need to manage two individual wildcard certificates.
You can go with a multi-domain wildcard certificate, where you can add up to 100 multiple domains or subdomains.
For example,
*.mydomain.tld
*.sub1.mydomain.tld
*.sub2.mydomain.tld
*.anydomain.com
It will secure your multiple domains and multi-level subdomains and reduce your hassle from multiple certificate management.
As per 7 year old article at https://www.digicert.com/news/2010-9-1-new-wildcard-features/ :
DigiCert Wildcard Plus certificates can secure any subdomain using
subject alternative names (SANs). A traditional wildcard certificate
for *.example.com will only secure a first-level subdomain of
example.com such as mail.example.com. DigiCert’s Wildcard Plus
certificate uses SANs to secure any subdomain of example.com,
including multi-level subdomains such as mail.internal.example.com.
With this new feature, all subdomains can be secured with a single
Wildcard Plus certificate from DigiCert. The base domain itself,
example.com, is automatically included as a SAN in every Wildcard Plus
certificate as well, which increases compatibility and protects
example.com with or without the “www.”
No, You can't create sub-certificate for your wildcard.
-> Your wildcard Certificate is for *.mydomain.tld, so as per Wildcard SSL guideline you can secure first level sub-domains. Means anything.mydomain.tld can be secured.
-> But if you want to use it to secure *.subdomain.mydomain.tld, which is for second level sub-domains, but wildcard certificate cant secure second level sub-domains.
Solution
-> You need to buy one more wildcard SSL Certificate for your second level sub-domain *.subdomain.mydomain.tld

Multi tenant application - SSL certificate

We have a multi tenant application which works based on domain wildcard registration, now we would wanted to add SSL certificate to our application,
So I need to correct approach on how it should be used,
I know about godaddy Wildcard SSL with which you can define un-limited no of subdomain and apply this certificate, but in our case the subdomain are not physically specified we are identifying it with wildcard only, all subdomain are pointing to single domain/server only just application who understands and behaves accordingly.
Can someone guide me on this.
A wildcard certificate is signed for CN=*.example.com
That means a HTTPS client/browser will match the invoked DNS name with the wildcard, and as long as it's a level one subdomain, it will match. That is because the * is a special token in the common name (CN).
So foo.example.com and bar.example.com will match. foo.bar.example.com will, however, not.
As far as the certificate is concerned, you don't have to define a list of valid subdomains anywhere.
So your guess is right, simply buy a wildcard certificate from your CA of choice and your done.

Wildcard SSL - Do I need another SSL for subsubdomain.subdomain.domain.com?

I'm not sure if I could word it right. I know that Wildcards SSLs will support any amount of subdomains in a domain. But does it also support subdomains of already existent subdomains?
I'm about to buy a wildcard SSL but I need to have this kind of setup: subsubdomain.subdomain.domain.com
Will I need more certificates or will only one wildcard certificate be enough?
Thanks.
Yes wildcards can support sub domains of already existent sub domains, but there are different criteria to secure your domain and sub domains and multi level sub domains.
First: If you only need to secure your *.subdomain.domain.com
In this case you can secure your all sub domains with single Wildcard SSL. CSR require to be generated on subdomain.domain.com – Wildcard SSL will only work with this condition.
The caveat to choosing wildcard ssl to secure your multi level sub domain is it will not cover your top level domain. If someone tries to access your https://domain.com then they will find domain name mismatch error in web browser.
Second: If you want to secure your entire website.
Including all of the following:
domain.com (top level domain)
*.domain.com (sub domain)
*.*.domain.com (sub sub domain)
You need to secure your whole website with single UCC/SAN Certificate. It will help you to secure all above conditional webpages with the use of Subject Alternative Name (SAN) certificate.
Hope now you understand what to do. Know your business needs perfectly and choose the certificate.

Generating a CSR for root domain (includes www or not?)

I am trying to set up SSL for the first time. I purchased my domain and SSL certificate from Gandi.net. Their docs say
subdomain.example.com indicates the subdomain that you want to
protect. This is the most important part. If you have a single-address
certificate to activate, you should put in the full subdomain (e.g.
foo.example.com). The www subdomain is added automatically by the CA,
for example, example.com will secure both example.com and
www.example.com If you have a wildcard certificate, you should put in
a * for the subdomain (e.g. *.example.com). Wildcard certificates also
secure the raw domain (with no subdomain).
- http://wiki.gandi.net/en/ssl/csr
I am hosting my app on Heroku and their docs say:
The Common Name field must match the secure domain. You cannot
purchase a certificate for the root domain, e.g., example.com, and
expect to secure www.example.com. The inverse is also true.
Additionally, SSL Endpoint only supports one certificate per app.
Please keep this in mind for multi-domain applications and specify a
Common Domain that matches all required domains.
- https://devcenter.heroku.com/articles/ssl-endpoint#acquire-ssl-certificate
These seem to conflict. Please advise!
You'll want to get a certificate from an authority that supports the Subject Alternate Name X.509 extension.
This will let you get a domain with its Common Name set to www.mydomain.com, and an Alternate Name set to mydomain.com(as Lloeki noted, you should provide both names as alternate names).
It depends what Certificate Authority(CA) you have been choosen to purchase certificate.
Some of them provide alternate domain name including "www" like option some of them no.
As you have written above:
I am hosting my app on Heroku and their docs say:
The Common Name field must match the secure domain. You cannot
purchase a certificate for the root domain, e.g., example.com, and
expect to secure www.example.com. The inverse is also true.
Additionally, SSL Endpoint only supports one certificate per app.
Please keep this in mind for multi-domain applications and specify a
Common Domain that matches all required domains. -
https://devcenter.heroku.com/articles/ssl-endpoint#acquire-ssl-certificate
It is true - because yourdomain.com and wwww.yourdomain.com are considered as different domains (multi-domain) and your certificate has to be trusted to recognize both of them. So before generating CSR string please attentively read requirements for CSR string and features provided by a CA.

Is it possible to have a valid sub-subdomain with a wildcard certificate?

Say I have the following domain:
example.com
I have a Wildcard SSL certificate for this domain. Subdomains like test.example.com validate properly. However, when I try to use a domain like demo.test.example.com, I get an error message in all major browsers:
demo.test.example.com uses an invalid security certificate.
The certificate is only valid for the following names:
*.example.com , example.com
Is it possible to use a wildcard certificate for a "sub-subdomain"?
Well, you've already verified that you can't! Here's why:
From: http://www.ietf.org/rfc/rfc2818.txt
Names may contain the wildcard character * which is considered to
match any single domain name
component or component fragment. E.g.,
*.a.com matches foo.a.com but not bar.foo.a.com. f*.com matches foo.com
but not bar.com.
The standards don't allow a wildcard to work on multiple levels. However, you can put the specific multilevel subdomain in as a Subject Alternative Name in the wildcard certificate and it will work. Some certificate providers (like DigiCert) allow this.
Yes, you can use wildcards. But they only extend to that level of subdomain.
*.example.com works for test.example.com but not for demo.test.example.com.
You would have to specify *.*.example.com in the certificate. I'm not sure this would continue working with test.example.com.
Technically you could specify the following alternative names in the certificate and then it should work:
example.com
*.example.com
*.*.example.com
I don't know if there are certificate authorities that provide such certificates.