DNS problem after following installation guide

I followed the standard installation guide: setting up a new droplet on DigitalOcean, unpacking the Discourse image there, linking it up to our SparkPost mailer and so on. Everything works perfectly - kudos to the team for such a painless process! - and I can access the new site via the IP but not via its intended subdomain. I previously added subdomains to our site by setting up A records on Cloudflare pointing to the IP of the server, and having Apache virtual hosts on the server. This new droplet however doesn’t appear to be using Apache virtual hosts, and simply creating the A record on Cloudflare with the droplet IP doesn’t do anything - Cloudflare gives a 521 Webserver Down / connection refused error. What should I be doing?

You generally edit DNS at the place where you purchased your domain name from. Cloudflare sounds right, if cloudflare is in charge of your DNS for that domain name.

Creating an A record for forum.example.com to the IP of your VPS should work, assuming the target ip is a VPS running only Discourse.

Yes, all our DNS are set on Cloudflare, and the VPS only runs Discourse. However, creating the A record was not enough; it’s not working. I can access Discourse through the IP but not through the subdomain.

Any ideas what might be wrong?

That’s odd, I don’t have any ideas – the A record pointing to the IP address should work, provided you’ve followed our install guide closely and haven’t deviated from the install steps.

I am not sure what you mean by

having Apache virtual hosts on the server

since that is not part of the install guide.

1 Like

521 is not a standard error – It means that you are connecting to cloudflare and cloudflare is unable to reach the origin. I would set the DNS to bypass cloudflare and connect directly to the instance. At the very least that will give a more useful error message.


Is that already public so one could look into DNS resolution and possible issues?

@judith if cloudflare is involved here make sure all “flaring” is turned off for this domain name, the only thing you want from cloudflare is DNS resolution.

I was about to post more error details, but then I noticed that turning “flaring” off seems to have improved the situation: the forum is now available via http, just not https like the rest of the domain. Thank you @codinghorror for the idea!

1 Like

I would advise you to complete the registration process after the setup wizard was finished, as otherwise one can annoy you with admin account registration mails (and your admin email is visible to the public domain).

1 Like