15

We have a website and we'd like to check if the certificate installed is a wild-card certificate or tied to the specific URL only. Could this be checked in an easy way?

6 Answers 6

22

Browse to a secured page on your server, ie: https://yoursite.com

Click on the padlock in the URL bar and view the certificate. To do this in Chrome you click on the Connection tab then Certificate Information.

Check that the Common Name (CN) contains a * in front of your domain name.

Eg. for https://www.google.com

*.google.com cert

1
  • 5
    This is answer is a little inaccurate, or rather; incomplete. The Common Name for a wildcard certificate does not need to start with an asterisk (e.g., it can be instead listed simply as "example.com"). In that case a header named Extensions should be shown below Fingerprints containing an item called Certificate Subject Alternative Name with domain values including the wildcard "*.example.com" value.
    – Will
    Apr 22, 2018 at 2:58
10

This can be done by checking for the common name in the SSL's subject. You can use the bash command openssl on *NIX clients.

For instance, google.com and www.google.com use two different SSLs. The first is a wildcard, the second is domain specific.

$ echo | openssl s_client -connect google.com:443 2>/dev/null | openssl x509 -noout -subject | grep -o "CN=.*" | cut -c 4-
*.google.com
$ echo | openssl s_client -connect www.google.com:443 2>/dev/null | openssl x509 -noout -subject | grep -o "CN=.*" | cut -c 4-
www.google.com
1
  • No longer working on Mac. It says invalid2.invalid
    – Houman
    Jun 8 at 19:48
4

You could look up the cert at its issuer-- you should be able to see there whether it's issued to *.domain.com or www.domain.com. Eg, Verisign.

2
  • Any idea if GoDaddy has a similar kind of search?
    – jwegner
    Mar 5, 2013 at 18:51
  • 1
    If " *.domain.com " then wildcard and if "www.domain.com" or "pay.domain.com" then domain specific ! Jul 2, 2015 at 8:14
2

Similar to other online tools for web purposes, I found this handy too, quite simple replace your hostname with your https siteurl it will explain what problem you are going through, and what solutions can benefit you...

https://www.sslshopper.com/ssl-checker.html#hostname={siteurl}

1
  • 1
    It is simple easy to understand and precise. Thank you @justnajm!
    – Dung
    Feb 3, 2021 at 18:49
0

Additionally, you can use free online tools like https://www.ssllabs.com/ssltest. Besides the domain info, they will also tell you other important detail about your certificate.

0

Using command line openssl client, this can be checked as follows, on all UNIX like systems:

SERVERNAME=google.com; echo | openssl s_client -showcerts -connect $SERVERNAME:443 -servername $SERVERNAME 2>/dev/null| grep subject | grep -o "CN=.*"

This is an improvement over the Steve Robbins answer above.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.