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

Show comments

Submit an answer

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!

Sign In or Sign Up to Answer

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

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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 ?