# Hoe voeg ik ssl toe aan een niet-www domein?

**URL:** https://meta.discourse.org/t/how-to-add-ssl-to-non-www-domain/222869
**Category:** Support
**Created:** [1 april 2022 om 19:23 UTC](https://meta.discourse.org/t/how-to-add-ssl-to-non-www-domain/222869 "2022-04-01T19:23:36Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![smth1](https://avatars.discourse-cdn.com/v4/letter/s/a587f6/32.png) [@smth1](https://meta.discourse.org/u/smth1)
#### Post date: [1 april 2022 om 19:23 UTC](https://meta.discourse.org/t/how-to-add-ssl-to-non-www-domain/222869/1 "2022-04-01T19:23:36Z")

</div>

Hello,

I have installed my forum on the www subdomain with the beginner setup.  
I want to have ssl on non-www root domain, how can I add it via ssh?  
www and non-www are A records to VPS where I have discourse installed.

Thanks!

btw.

 ![image](https://global.discourse-cdn.com/meta/original/3X/5/6/5652844adc5e413f22a8a1e7e867c8b64605ab88.jpeg)

I’ve added [this advice](https://meta.discourse.org/t/setting-up-let-s-encrypt-with-multiple-domains/56685) to app.yml. Then rebuilded the app, still not working.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [1 april 2022 om 19:49 UTC](https://meta.discourse.org/t/how-to-add-ssl-to-non-www-domain/222869/2 "2022-04-01T19:49:39Z")

</div>

Don’t know why that didn’t work. I tihnk I’ve tested that lately, but see [https://forcewww.com](https://forcewww.com) as a workaround.

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [1 april 2022 om 19:53 UTC](https://meta.discourse.org/t/how-to-add-ssl-to-non-www-domain/222869/3 "2022-04-01T19:53:21Z")

</div>

You’re already using Cloudflare, so just set page rule to redirect the traffic?

---

<div class="post-metadata">

### Author: ![smth1](https://avatars.discourse-cdn.com/v4/letter/s/a587f6/32.png) [@smth1](https://meta.discourse.org/u/smth1)
#### Post date: [1 april 2022 om 20:12 UTC](https://meta.discourse.org/t/how-to-add-ssl-to-non-www-domain/222869/4 "2022-04-01T20:12:46Z")

</div>

Ok, I’ve enabled CDN on Cloudflare with their SSL.

Also I’ve made page rules:

```plaintext
http://virtmach.com => https://www.virtmach.com
http://www.virtmach.com => https://www.virtmach.com
https://virtmach.com => https://www.virtmach.com

```

Also, I’ve enabled “Always use HTTPS”.

Let’s see how it works.

---

<div class="post-metadata">

### Author: ![smth1](https://avatars.discourse-cdn.com/v4/letter/s/a587f6/32.png) [@smth1](https://meta.discourse.org/u/smth1)
#### Post date: [1 april 2022 om 20:15 UTC](https://meta.discourse.org/t/how-to-add-ssl-to-non-www-domain/222869/5 "2022-04-01T20:15:46Z")

</div>

Now I have this problem. I guess the Let’s Encrypt SSL and ngnix redirect should be disabled at server? Any tips?

 ![Capture](https://global.discourse-cdn.com/meta/original/3X/d/8/d84787ea56b6d4d46cbb5c3e9eb4de966b097b40.png)

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [1 april 2022 om 20:30 UTC](https://meta.discourse.org/t/how-to-add-ssl-to-non-www-domain/222869/6 "2022-04-01T20:30:22Z")

</div>

Redirect whichever domain isn’t configured at Discourse using a Page Rule. No additional configuration on the Discourse server.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [1 mei 2022 om 20:30 UTC](https://meta.discourse.org/t/how-to-add-ssl-to-non-www-domain/222869/7 "2022-05-01T20:30:50Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
