# Changing domain and getting certificate for www

**URL:** https://meta.discourse.org/t/changing-domain-and-getting-certificate-for-www/283778
**Category:** Self-hosting
**Created:** [October 28, 2023, 5:39pm UTC](https://meta.discourse.org/t/changing-domain-and-getting-certificate-for-www/283778 "2023-10-28T17:39:28Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![dogwaters404](https://avatars.discourse-cdn.com/v4/letter/d/b4bc9f/32.png) [@dogwaters404](https://meta.discourse.org/u/dogwaters404)
#### Post date: [October 28, 2023, 5:39pm UTC](https://meta.discourse.org/t/changing-domain-and-getting-certificate-for-www/283778/1 "2023-10-28T17:39:28Z")

</div>

Hi all,

So I’m currently host discourse via the recommend method using the setup script with the docker container.

I need advise on the following matters:

1. I want to migrate the domain from [example.com](http://example.com) to forum. example. com , I got some ideas on how to do this but I’d like some advise

2. when I generated the SSL cert during the setup script, it didnt apply for www. and just [example.com](http://example.com) , i assume if I use “www. forum. example. com”, it will apply also for “forum. example. com”?

Thanks

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [October 28, 2023, 5:42pm UTC](https://meta.discourse.org/t/changing-domain-and-getting-certificate-for-www/283778/2 "2023-10-28T17:42:01Z")

</div>

You can follow this guide

> [@Change the domain name or rename your Discourse](https://meta.discourse.org/t/change-the-domain-name-or-rename-your-discourse/16098):
>
> bookmark This guide explains how-to change the domain name of your Discourse site, and includes information about setting up DNS changes, editing configuration files, updating site settings, and correcting social logins and post content to reflect your new domain name. warning This guide is for self-hosted Discourse instances that were installed using our [installation guide on GitHub](https://github.com/discourse/discourse/blob/main/docs/INSTALL-cloud.md). If you are [hosted by Discourse](https://www.discourse.org/pricing), please see [Configure your domain name for hosted Discourse](https://meta.discourse.org/t/configure-your-domain-name-for-hosted-discourse/21827) for specific …

---

<div class="post-metadata">

### Author: ![dogwaters404](https://avatars.discourse-cdn.com/v4/letter/d/b4bc9f/32.png) [@dogwaters404](https://meta.discourse.org/u/dogwaters404)
#### Post date: [October 28, 2023, 5:44pm UTC](https://meta.discourse.org/t/changing-domain-and-getting-certificate-for-www/283778/3 "2023-10-28T17:44:33Z")

</div>

Thank you, and what about the matter with R3 SSL?

---

<div class="post-metadata">

### Author: ![dogwaters404](https://avatars.discourse-cdn.com/v4/letter/d/b4bc9f/32.png) [@dogwaters404](https://meta.discourse.org/u/dogwaters404)
#### Post date: [October 28, 2023, 6:17pm UTC](https://meta.discourse.org/t/changing-domain-and-getting-certificate-for-www/283778/4 "2023-10-28T18:17:05Z")

</div>

```plaintext
after_ssl:
    - replace:
        filename: "/etc/runit/1.d/letsencrypt"
        from: /-d www.first-domain.com/
        to: "-d www.first-domain.com -d second-domain.com -d www.second-domain.com -d other-domain.com -d www.other-domain.com "

```

I followed this, rebuilding now to see.
