Changing subdomain post-installation (a.example.com to b.example.com)

Hi all,
We completed the installation of our Discourse using DigitalOcean Marketplace installation. However, we have change of plans and would like to change our subdomain.

This means we want to change a.example.com to b.example.com (same domain). Our domain is managed using Namecheap for reference.

Tried searching for resources on this exact problem, but couldn’t find a straightforward solution. Any help here?

Thanks!

Because you don’t need to move to another server it is basically just changing DNS, app.yml and search&replace new url inside database.

You can find suitable topic here using search, but because I’m lazy I asked what AI of Discourse thinks.

https://ask.discourse.com/discourse-ai/ai-bot/shared-ai-conversations/OIkWsd6IiDOfYSGhkLQj2A

3 Likes

Let’s chuck the guide in for good measure :slight_smile:

5 Likes

Another way to do it is to do a backup, change the domain name, rebuild (but destroy/start might be enough) and restore.

I think it’s easier and less error prone than doing it by hand as described in the guide.

3 Likes