Changing discourse from domain to subdomain?

Hello there, and sorry I know this has been asked in the past. I’ve tried to do diligent research on the matter, and in doing so looked at several existing threads, including this one:

I guess I’m not following 100% because the situation isn’t exact or close enough to my own. In my case I installed Discourse on the main domain, thinking we would use it exclusively. So the install is at example.com and I’d like to change it to be at discourse.example.com, and then install a blog for the main domain (separate server).

The instructions mention removing the old domain name from site settings, but the domain name will in fact be a subdomain of the same domain, so I’m not sure how that would be done.

Does this mean I’ll need to edit the app.yml for the domain name, which seems pretty straightforward, and then remap, rake posts, rebake as indicated in referred post?

Thanks in advance for any additional details you may have to offer, I appreciate it.

Technically, sub.example.com is different than example.com despite being part of same domain. You can safely follow those instructions replacing example.com with discourse.example.com and it will migrate your forum to the subdomain.

Apart from rebuild the remap command should be:

discourse remap example.com discourse.example.com

4 Likes

Ah, ok, yeah that makes perfect sense actually.

Final question would be the issue with the social logins. I currently have them set to the main domain, when it says to update them I assume that means update the settings for the login app itself with the login provider (in my case FB and Twitter), is that correct

You’ll need to update your domain on all external services Including:

social login
Analytics
Uptime monitoring
Anything else

E.g. go to Facebook developers console and update the callback url and Authorized domain and same for twitter.

3 Likes

Ok thanks so much for the clarity. :blush:

1 Like