Setting up Cloudflare, "DNS only" works but not "Proxied"

I feel like I have the most common setup on Cloudflare, yet, I can’t get this to work.

I have an AWS EC2 instance hosted webserver: eg 13.x.x.x
I have a Route53 domain: eg

I have already changed my nameservers on Route53 to the ones provided by cloudflare
I also setup DNS records on Cloudflare: Cname =

Here’s my question, cloudflare only works when it’s “DNS Only”, it doesn’t work when it’s “Proxied”
How do i get it to work when it’s “Proxied” because the whole point of using Cloudflare is to have my domain name proxied by Cloudflare. Please help.

That’s pretty vague. What’s the error you’re seeing?

Hi sdayman,

Thanks for your quick reply.

When i type in my domain name when using “DNS only”, it works and shows my website

But when i switched to “Proxied”, it gives the cloudflare error. Hope this helps. Thanks

Error 522

Ray ID: 657bc12a3ed7fb94 • 2021-05-30 23:31:11 UTC

A 522 error typically happens when Cloudflare requests to the origin (your webserver) get blocked. Review the suggestions in this Community Tip for troubleshooting ideas.

1 Like

Hi Sdayman,

Thanks for the tip, wow, that’s going to be tricky to work out but at least it’s a start

1 Like