Change the domain name or rename my Discourse?

(Nichalas Petranek) #59

I decided to open up the github repos for discourse and explore to see if I could find where to solve my problem. After about 20 minutes, I’ve ended up in /lib/email/message_builder.rb and found the first mention of a base_url as found in the email templates.

I’m not quite sure how to follow up on what I’ve found, as I’m trying to find where I can edit the value stored in the variable.

(Jay Pfaffman) #60

This may be a silly question, but have you rebooted your server lately? Some stuff can get cached in strange ways.

(Nichalas Petranek) #61

I’ll have it done again tonight during my forum’s natural break in activity.


I want to change my subdomain for my Discourse installation like to

I changed hostname in app.yml. After change, rebuild app. Now, Discourse is live again but nothing is changed. Discourse still works on domain.

Where can the problem be?


I notice @bekircem asked a question that has not seen an answer, and as a basic user, I will be facing the same challenges he faced. Do we have a solution? I want to change subdomains on the same domain.

(Jay Pfaffman) #66

It’s unclear whether there is (or was) a bug or if he did something wrong. @bekircem, did you did your problem? Do you have a standard install or do you have something upstream that’s doing a reverse proxy that needs to be changed?


I am yet to start my switch, so I was reading on what’s closest to mine, and I found this one that wasn’t addressed. The tutorial at the beginning of this thread is for advanced users. Makes so many assumptions.

(Jay Pfaffman) #68

Hmm. I’ll admit that I’m an advanced user, but it didn’t strike me as making lots of assumptions.

One thing that could make it easier is that you can run disourse-setup again rather than edit the config file. I’ll see if I can do that when I’m not on my phone.


One little assumption, my install was done for me on DO.

This is my type of tutorial

(Neil Lalonde) #70

Does it work on

To make it stop loading on, you should remove the DNS settings that point it to the Discourse server.

(Jay Pfaffman) #71

Ah! I bet that he’s not using https (because then there would be another problem). If https was on it’d redirect to the new domain.

(Jay Pfaffman) #72

Now I get it. Since it’s more difficult to change domains than to do the install it seems like a fair assumption that you know how to log in the the server.

Instructions for overhauling the engine assume you know how to change the oil. :slight_smile:


That is changing the engine, not the oil. But I will try understand the clean install process in the next few hours and report.

Although I realize I’m not sure whether a clean install means I get a separate droplet.

(Jide Ogunsanya) #74

can you please share the steps in re-running the set up as a way of changing the url?

(Alexander Wright) #75

You may wish to point your old name at a remapping server that returns a 301 HTTP redirect to your new server.

(xiasummer) #88

I encountered the same problem. Could you please provide a solution to remove the old certificate and add a new one?

(Bhanu Sharma) #89

If you’re letting discourse setup manage ssl then it should automagically get the ssl for new domain as long as your new domain points to the IP of your server.

(Jose C Gomez) #90

So I was able to do this and everything worked great, however because of HSTS now my old domain won’t re-direct to new domain properly (complains about invalid cert)
So… is the solution here to spin up the old domain back up with just a plain site with 301 redirects and lets ecrypt?

(Jay Pfaffman) #91

That’s the easiest solution. There is a topic about keys encrypt on multiple domains that can give you hints on how to get a cert for both domains.

(Jose C Gomez) #92

Thanks that’s what I eneded up doing. (spining up subsits on nginx and redirect)