Backup domain name: cloudflare killed my forum

AI-generated summary

Isambard reports that Cloudflare’s outage has made their Discourse forum inaccessible, as they can’t log in to adjust DNS settings. They ask if configuring a backup domain (e.g., backup.mymforum.com) could bypass Cloudflare’s proxy. RGJ suggests using the Cloudflare API to disable the proxy without changing DNS, sharing CLI commands to list and modify DNS records. Isambard confirms the API works but notes additional complexity due to reliance on Cloudflare’s internal SSL certificates, requiring new certs to be set up. They also question how to handle multiple domains (e.g., forum.a.com and forum.b.com) without rewriting the site. RGJ links to a guide on setting up Let’s Encrypt with multiple domains and redirects, noting that Nginx may need configuration to avoid redirects. The discussion highlights risks of over-reliance on Cloudflare and the need for backup access strategies during outages. 利仔1 posts in Chinese, seemingly unrelated or garbled, possibly indicating a mispost or translation issue. jahan_gagan notes that users must wait for Cloudflare to come back online if no API or backup is available.

OK. I have cloudflare as a proxy in front of discourse. Cloudflare is currently down and the problem I have is I cannot even log onto cloudflare to re-configure the DNS to bypass their servers.

So currently, I cannot access discourse via its normal domain name.

I was wondering if it is possible to configure a backup domain name which can be used which I would then bypass cloudflare and have discourse respond with this alternative name i.e. not re-write to default.

e.g. if my normal forum is myforum.com, then i setup backup.myforum.com as an alternative.

I have no idea why, but when I woke up, all websites with CF protection shields were inaccessible.

AFAIK, You have to wait for Cloudflare to come back online.

If you have a Cloudflare API token available and are not afraid of a command line, you can turn off the proxy like this:

First grab the zone ID via:

curl -X GET "https://api.cloudflare.com/client/v4/zones" -H "Authorization: Bearer $API_TOKEN" -H "Content-Type: application/json" | jq -r '.result[] | "\(.id) \(.name)"'

And a list of DNS records using:

curl -X GET "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/dns_records" -H "Authorization: Bearer $API_TOKEN" -H "Content-Type: application/json"

Each DNS record will have an ID associated. Finally patch the relevant records:

curl -X PATCH "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/dns_records/$RECORD_ID" -H "Authorization: Bearer $API_TOKEN" -H "Content-Type: application/json" --data '{"proxied":false}'

Hi Richard.

Thanks. Yes, the API could be a solution (assuming it is still working) for changing the DNS.

My other question was on the discourse side: is it possible to run a forum that presents multiple different domain names?

It is. No need to change the DNS, you just need to turn off the proxy.

Sure. How are people going to know where to go?

Unfortunately, it was more involved as the site was configured to use Cloudflare’s internal SSL certficates and so new SSL certs had to be set up etc. etc.

Ironic that over-reliance on cloudflare, which is intended to protect websites and keep them up is also a weakness that can cause them to be down.

Sure. How are people going to know where to go?

how do you give the forum 2 different domain names? e.g. a.forum.com and b.forum.com without requests to b.forum.com being re-written to a.forum.com?

See Set up Let’s Encrypt with multiple domains / redirects - #172 by featheredtoast

you might have to tweak Nginx to avoid the redirect, I don’t know the details of the Docker setup.