Report this

What is the reason for this report?

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

Posted on May 30, 2017

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 :)



This textbox defaults to using Markdown to format your 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.

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.

@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.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.