Question

Do i need to buy separate SSL certs for www and non-www ?

Let’s say I have a website named example.com hosted here in DO. Currently, I am redirecting all www urls to non-www equivalent. So if a request comes at www.example.com the server will redirect it to example.com.

Now I want to use SSL on my site. My question is do I have to buy separate SSL certs for www and non-www version of the domain ?

Thanks :)

Subscribe
Share

Most certificate and hosting companies (DigitalOcean included) will cover example.com and www.example.com on the same certificate. In most cases, these are on the same server, with the same IP address. Guided by DNS configuration, the server distributes requests for any-name.example.com.

Beware of your DNS configuration, especially with respect to mail servers. The world would like to see a one-to-one relationship in forward (name to IP) and reverse (IP to name) lookups. Somewhere in DNS is an SPF record that says host x.x.x.x has authority to send mail on behalf of mail.example.com.

Covering xyz.example.com is another matter, requiring either a separate certificate or a wildcard certificate.

I have a cPanel, CentOS7, VPS account. I cover my VPS server server.example.com with a certificate; I use a certificate client.com to cover http requests to client.com aka www.client.com.

I declare smtp.client.com and mail.client.com in DNS. Technically, I should be able to declare mail.client.com and smtp.client.com as servers. Occasionally, I run into trouble and now make sure to claim smtp.example.com as my mail server.

Can anyone tell me if I have an wildcard certificate for my domain but if I want to purchase another wildcard for my webpage (Career page) then the previous wildcard would be revoked? or is it possible to have 2 different wildcard certificate for different pages of the website?

Its urgent if some onecan guide me


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

Hi @ozwiz

Most certificate providers will give you www.example.com for free, when you buy example.com

But you can get free signed certificates with Let’s Encrypt. You can follow the tutorial depending if you’re using as web server. Apache: https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-16-04 Nginx: https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04

You do not need to buy separate SSL certificates because Now Single domain validation (DV) SSL Certificate will secure the both www and non-www version of the domain name by default.

Generally, most of the well-known Certificate Authorities such as Comodo, RapidSSL, GeoTrust, Thawte, GlobalSign, etc… issue a domain validation SSL certificate along with WWW and NON-WWW support feature.

If you get single DV SSL certificate from such authorities to protect non-www URLs, which is redirected from www URLs, there will be no issue, because if the CSR is generated for www.example.com then it will automatically work for example.com also.

This comment has been deleted

the cost of wildcard ssl cert is very high. Is there any way to get the same behavior using standard SSL ?

@ozwiz

No you can have SSL certificate for *.example.com or sometimes you might need to specify all the subdomains of your main domain for example you can have one SSL certificate for example.com and for www.example.com.

Hope this helps.