Question

Bad Gateway - error 521 than 502 after setting Cloudflare DNS

Posted May 21, 2018 5k views
One-Click Install AppsCDNUbuntu 18.04

Hello, I linked my domain to my wordpress application and everything works. but when I change the DNS to configure CloudFlare, nothing else works and host error. normally everything works fine i can not find the problem. no firewall and the server is UP.

thanks again

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
3 answers

Are you able to access your site by the IP address directly? A 521 error from CloudFlare indicates that your web server refused the request sent through from CloudFlare.

  • Yes the IP work. FInally I swicth to FLEXIBLE SSL and I install Really Simple SSL plugin to my wordpress. Now all work fine.

I had the same problem when I pointed my website to my new IP. Originally I was with SiteGround but switched hosting to a one click WP Digital Ocean install (Ubuntu 18.04). After updating my DNS with CloudFlare my website went down (both 521 & 502 errors). The fix for me was turning SSL to Off (Flexible allowed the site to open but the format was all messed up). I have an active SSL certificate so I am not really clear as to why it wasn’t working… Will do some more research but for now I am just glad to have my site back up and running.

I resolve the problem with “Really Simple SSL” plugin WP

Submit an Answer