IP address instead of the URL


(Ringgit Malaysia) #1

So, I am pretty new but I find it amazing that I was able to install Discourse into Digital Ocean and get it up and running in less than 2 hours (yeah, I had some areas with the DNS and mailgun which I had to troubleshoot but the worst is over). I have one nagging problem - the Discourse forum is showing the IP address in the address bar instead of the URL. I am not sure where I can fix it in Discourse. Or is it in my DNS record? Appreciate any advice!


(cpradio) #2

It is likely in your app.yml. There is a Host name configuration and it is likely using your IP address there, change it to your DNS name and you should be good to go and then run ./launcher rebuild app


(Ringgit Malaysia) #3

If you mean this in the app.yml file,

## TODO: The domain name this Discourse instance will respond to DISCOURSE_HOSTNAME: forum.loopgit.com
it’s already set up properly.


(cpradio) #4

And you rebuilt the app using ./launcher rebuild app? As it should be able to access it via forum.loopgit.com so long as you have that qualified name pointing to your Digital Ocean droplet properly.

Removed Digital Ocean link as it suggest changing your nameservers to Digital Ocean, you simply need to setup a proper A and CNAME record in your current domain registrar


(Jeff Atwood) #5

PLEASE do not link to advice that tells people to set their DNS servers to digital ocean’s. That is seriously toxic. (and why is DO telling people to do this? Awful.)

Rather, all they need to do is go to their existing DNS registrar – the same place they purchased the domain name from, usually – and add an A record pointing to the IP.


Discourse is only accessible by IP address
(cpradio) #6

Ahh, I just skimmed their documentation from my search result and saw the A record section and CNAME section and thought it was covering what needed to be done.


(Ringgit Malaysia) #7

I didn’t need to run rebuild because my app.yml is coded correctly, no IP addresses in the app.yml file.


(Ringgit Malaysia) #8

lemme try this out. Thank you!


(Ringgit Malaysia) #9

BRILLIANT! This worked! <3


(Régis Hanol) #10