Cloudflare gives you free DNS, a CDN and basic DDoS protection for websites. This guide connects your domain to Cloudflare and then to your RHQ service.
-
Add the site to Cloudflare
Create a free account at cloudflare.com, click Add a domain, enter your domain and choose the Free plan.
-
Change the nameservers at your registrar
Cloudflare shows you two nameservers (for example
name.ns.cloudflare.com). Log in at the registrar where you bought the domain, replace the existing nameservers with these two and save.Propagation usually takes from a few minutes up to 24 hours. Cloudflare emails you when the domain is active.
-
Point the domain to your server
In Cloudflare open DNS → Records and add:
Type Name Content Proxy status A @YOUR_SERVER_IPProxied (orange cloud) CNAME wwwyourdomain.comProxied (orange cloud) -
Set SSL/TLS mode
Go to SSL/TLS → Overview and choose Full (strict) if your server has a valid certificate (for example Let's Encrypt). Use Full if it has a self-signed one. Avoid Flexible: it causes redirect loops on most sites.
When to disable the proxy
The orange cloud only works for HTTP and HTTPS traffic. For game servers, mail, SSH or anything else, set the record to DNS only (grey cloud), otherwise the connection will fail.
Proxied (orange cloud) is recommended.
Use DNS only and point an A record such as play to the server IP.
Use DNS only for the mail record and for any MX target.
Troubleshooting
The site shows error 521 or 522
Cloudflare cannot reach your server. Check that the web server is running and that your firewall allows Cloudflare's IP ranges on ports 80 and 443.
The domain still shows the old site
DNS has not finished propagating or your browser cached the old address. Wait a little and test with nslookup yourdomain.com.