# SSL - not secure with prefix www

**URL:** <https://forum.ghost.org/t/ssl-not-secure-with-prefix-www/16778>\
**Category:** Installation\
**Created:** [August 28, 2020, 9:15pm UTC](https://forum.ghost.org/t/ssl-not-secure-with-prefix-www/16778 "2020-08-28T21:15:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![BElluu](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/belluu/32/9454_2.png) [@BElluu](https://forum.ghost.org/u/BElluu)\
**Post date:** [August 28, 2020, 9:15pm UTC](https://forum.ghost.org/t/ssl-not-secure-with-prefix-www/16778/1 "2020-08-28T21:15:01Z")

</div>

Hello,  
when I write address devopsowy.pl - everything is ok - my web is secure but when I use www.devopsowy.pl I got unsecure connection with error NET::ERR\_CERT\_COMMON\_NAME\_INVALID. When I installed Ghost, I wrote my website address: [https://devopsowy.pl](https://devopsowy.pl) - maybe is it problem? How can I fix it - can I modify my current SSL cert from Let’s Encrypt? If no, how can I generate new for my web - is it possible with Ghost CLI ?

Thank you and best regards!

---

<div class="post-metadata">

**Author:** ![justishar1](https://avatars.discourse-cdn.com/v4/letter/j/b2d939/32.png) [@justishar1](https://forum.ghost.org/u/justishar1)\
**Post date:** [August 29, 2020, 4:21am UTC](https://forum.ghost.org/t/ssl-not-secure-with-prefix-www/16778/2 "2020-08-29T04:21:03Z")

</div>

Hi, I’m having this problem too. You have to go through a bit of a roundabout process apparently, outlined here:

> **[Ghost-CLI - A fully loaded tool for installation and configuration](https://ghost.org/docs/ghost-cli/#knowledgebase)**
>
> The best way to install, manage, and update your site locally or when self-hosting Ghost. A full guide for our advanced CLI tool.

(search the page for the section “SSL for additional domains”)

My problem, that I expect you will next encounter, is that once you get to the section where you set up the www version of the site with

```auto
ghost setup nginx ssl

```

I get told that the ssl config already exists, so the creation is skipped. However, looking at my /etc/nginx/sites-enabled, the ssl config only exists for the non-www version of the site. The config for the www version of the site is there, but it is not ssl enabled. I’m familiar with nginx and so I’m debating just adding tonfig manually, but I think it is a bit dumb to have to do this, and I also think that the documented process can easily be proven to be broken by attempting to complete these steps. I am using the Digital Ocean droplet, for the record.

---

<div class="post-metadata">

**Author:** ![BElluu](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/belluu/32/9454_2.png) [@BElluu](https://forum.ghost.org/u/BElluu)\
**Post date:** [August 29, 2020, 6:48am UTC](https://forum.ghost.org/t/ssl-not-secure-with-prefix-www/16778/3 "2020-08-29T06:48:26Z")

</div>

Thanks justishar1. That’s works! But I have one question - when I use [https://www.devopsowy.pl](https://www.devopsowy.pl) I have other SSL Cert than [https://devopsowy.pl](https://devopsowy.pl) - is it possible to using just one cert?

---

<div class="post-metadata">

**Author:** ![jeff](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/jeff/32/4900_2.png) [@jeff](https://forum.ghost.org/u/jeff)\
**Post date:** [August 30, 2020, 2:23am UTC](https://forum.ghost.org/t/ssl-not-secure-with-prefix-www/16778/4 "2020-08-30T02:23:56Z")

</div>

The web does support WILDCARD certificates (you can search for details) e.g. `*.mydomain.com` - but I don’t think these would work for `www.xyz.com` and `xyz.com` because the second name is missing the `.` part of the certificate, and you cannot register `*mydomain.com` for obvious reasons.

In any case, I think you have to pay a decent amount from one of the Certificate Authorities to get a WILDCARD.

It is just easier to have two domains and two certificates.

You might also find that the version of `certbot` that comes with your distribution is more reliable than the `ghost-cli` certificate management.

It can be tricky to integrate the `ghost-cli` certificate management into reliable secure NGINX auto-renewal.
