How do I use Cloudflare with my Minecraft server?
Cloudflare can host your DNS just fine, but there's one important catch: Cloudflare's proxy (the orange cloud) does not carry Minecraft's Java traffic. Keep your records DNS-only and you'll be set.
Why the proxy matters
Cloudflare's proxy is built for HTTP/HTTPS, not the raw Minecraft protocol. If you leave the orange cloud on, Java connections break because that traffic never passes through the proxy correctly.
Step-by-step
- Add your domain to Cloudflare and update your nameservers at your registrar to the two Cloudflare gives you.
- In Cloudflare DNS, add an A record for
play→ your server IP, and set it to DNS only (grey cloud), not proxied. - Add an SRV record if you use a custom port.
Warning: Leaving the orange proxy cloud on will break Java connections — Cloudflare's proxy is for HTTP, not the Minecraft protocol. Keep the record grey/DNS-only.
Frequently asked questions
What about DDoS protection through Cloudflare? The HTTP proxy won't protect a Minecraft server. Dedicated Minecraft proxies like TCPShield are a separate topic — see the DDoS article.
Do I still need an SRV record on Cloudflare? Only if your server uses a non-default port; on 25565 the A record alone is enough.