{"id":7227,"date":"2026-07-19T09:55:27","date_gmt":"2026-07-19T09:55:27","guid":{"rendered":"https:\/\/checksitestatus.com\/?p=7227"},"modified":"2026-07-19T09:59:14","modified_gmt":"2026-07-19T09:59:14","slug":"521-522-523-cloudflare-error","status":"publish","type":"post","link":"https:\/\/checksitestatus.com\/fr\/521-522-523-cloudflare-error\/","title":{"rendered":"521\/522\/523 Cloudflare Error: What It Means and How to Fix It"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"7227\" class=\"elementor elementor-7227\" data-elementor-post-type=\"post\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-6f45a1d elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"6f45a1d\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-e32e0e0\" data-id=\"e32e0e0\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-692d4cd elementor-widget elementor-widget-text-editor\" data-id=\"692d4cd\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"auto\" data-sourcepos=\"11:1-11:277;541-817\">If you&#8217;re running a site behind Cloudflare and a visitor suddenly sees an orange error screen with a number like 521, 522, or 523, the problem isn&#8217;t Cloudflare itself. It&#8217;s almost always your origin server, the actual machine hosting your website, that Cloudflare can&#8217;t reach.<br \/><br \/><\/p><p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"auto\" data-sourcepos=\"13:1-13:264;819-1082\">These three codes look similar and get mixed up constantly, but they point to different failures. Getting the right one narrowed down saves a lot of time, because the fix for &#8220;my server crashed&#8221; is completely different from &#8220;my DNS record points at the wrong IP.&#8221;<br \/><br \/><\/p><h2 class=\"text-text-100 mt-3 -mb-1 text-[1.125rem] font-bold\" dir=\"auto\" data-sourcepos=\"15:1-15:45;1084-1128\"><strong>Why these errors exist in the first place<\/strong><\/h2><p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"auto\" data-sourcepos=\"17:1-17:398;1130-1527\">Cloudflare sits between your visitors and your actual web server, acting as a reverse proxy. When someone requests your site, Cloudflare&#8217;s edge network handles the request first, then forwards it to your origin server if needed and passes the response back. That middle position is what makes Cloudflare fast and gives it DDoS protection, but it also means there&#8217;s a whole extra hop that can fail.<br \/><br \/><\/p><p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"auto\" data-sourcepos=\"19:1-19:289;1529-1817\">Codes in the 520 to 526 range are Cloudflare-specific. They don&#8217;t exist in the standard HTTP specification; they&#8217;re Cloudflare&#8217;s own way of telling you specifically where in that middle hop things broke down, instead of just returning a generic 502 or 504 the way an ordinary proxy would.<\/p><div class=\"overflow-x-auto w-full px-2 mb-6\" dir=\"auto\" data-sourcepos=\"21:1-29:130;1819-2597\"><table class=\"min-w-full border-collapse text-sm leading-[1.7] whitespace-normal\"><thead class=\"text-left\"><tr><th class=\"text-text-100 border-b-0.5 border-[hsl(var(--border-300)\/0.6)] py-2 pr-4 align-top font-bold\" scope=\"col\">Code<\/th><th class=\"text-text-100 border-b-0.5 border-[hsl(var(--border-300)\/0.6)] py-2 pr-4 align-top font-bold\" scope=\"col\">Name<\/th><th class=\"text-text-100 border-b-0.5 border-[hsl(var(--border-300)\/0.6)] py-2 pr-4 align-top font-bold\" scope=\"col\">Quick meaning<\/th><\/tr><\/thead><tbody><tr><td class=\"border-b-0.5 border-[hsl(var(--border-300)\/0.3)] py-2 pr-4 align-top\">520<\/td><td class=\"border-b-0.5 border-[hsl(var(--border-300)\/0.3)] py-2 pr-4 align-top\">Web Server Returned an Unknown Error<\/td><td class=\"border-b-0.5 border-[hsl(var(--border-300)\/0.3)] py-2 pr-4 align-top\">The origin sent back something Cloudflare couldn&#8217;t parse.<\/td><\/tr><tr><td class=\"border-b-0.5 border-[hsl(var(--border-300)\/0.3)] py-2 pr-4 align-top\">521<\/td><td class=\"border-b-0.5 border-[hsl(var(--border-300)\/0.3)] py-2 pr-4 align-top\">Web Server Is Down<\/td><td class=\"border-b-0.5 border-[hsl(var(--border-300)\/0.3)] py-2 pr-4 align-top\">Cloudflare couldn&#8217;t establish a connection to the origin at all.<\/td><\/tr><tr><td class=\"border-b-0.5 border-[hsl(var(--border-300)\/0.3)] py-2 pr-4 align-top\">522<\/td><td class=\"border-b-0.5 border-[hsl(var(--border-300)\/0.3)] py-2 pr-4 align-top\">Connection Timed Out<\/td><td class=\"border-b-0.5 border-[hsl(var(--border-300)\/0.3)] py-2 pr-4 align-top\">Cloudflare connected but got no response before timing out.<\/td><\/tr><tr><td class=\"border-b-0.5 border-[hsl(var(--border-300)\/0.3)] py-2 pr-4 align-top\">523<\/td><td class=\"border-b-0.5 border-[hsl(var(--border-300)\/0.3)] py-2 pr-4 align-top\">Origin Is Unreachable<\/td><td class=\"border-b-0.5 border-[hsl(var(--border-300)\/0.3)] py-2 pr-4 align-top\">Cloudflare can&#8217;t route to the origin&#8217;s IP address.<\/td><\/tr><tr><td class=\"border-b-0.5 border-[hsl(var(--border-300)\/0.3)] py-2 pr-4 align-top\">524<\/td><td class=\"border-b-0.5 border-[hsl(var(--border-300)\/0.3)] py-2 pr-4 align-top\">A Timeout Occurred<\/td><td class=\"border-b-0.5 border-[hsl(var(--border-300)\/0.3)] py-2 pr-4 align-top\">The origin accepted the connection but took too long to send data back.<\/td><\/tr><tr><td class=\"border-b-0.5 border-[hsl(var(--border-300)\/0.3)] py-2 pr-4 align-top\">525<\/td><td class=\"border-b-0.5 border-[hsl(var(--border-300)\/0.3)] py-2 pr-4 align-top\">SSL Handshake Failed<\/td><td class=\"border-b-0.5 border-[hsl(var(--border-300)\/0.3)] py-2 pr-4 align-top\">Cloudflare and the origin couldn&#8217;t agree on an SSL\/TLS connection.<\/td><\/tr><tr><td class=\"border-b-0.5 border-[hsl(var(--border-300)\/0.3)] py-2 pr-4 align-top\">526<\/td><td class=\"border-b-0.5 border-[hsl(var(--border-300)\/0.3)] py-2 pr-4 align-top\">Invalid SSL Certificate<\/td><td class=\"border-b-0.5 border-[hsl(var(--border-300)\/0.3)] py-2 pr-4 align-top\">The origin&#8217;s SSL certificate is invalid, expired, or self-signed in a way Cloudflare rejects.<\/td><\/tr><\/tbody><\/table><\/div><p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"auto\" data-sourcepos=\"31:1-31:131;2599-2729\">The rest of this guide focuses on 521, 522, and 523, since they&#8217;re the three that come up most often and cause the most confusion.<br \/><br \/><\/p><h2 class=\"text-text-100 mt-3 -mb-1 text-[1.125rem] font-bold\" dir=\"auto\" data-sourcepos=\"33:1-33:27;2731-2757\"><strong>521: Web Server Is Down<\/strong><\/h2><p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"auto\" data-sourcepos=\"35:1-35:278;2759-3036\">This means Cloudflare tried to open a TCP connection to your origin server on the port it expects (usually 80 or 443), and the server refused it or never responded to the connection attempt at all. Cloudflare can reach your network; it just can&#8217;t get your web server to pick up.<br \/><br \/><\/p><p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"auto\" data-sourcepos=\"37:1-37:19;3038-3056\"><strong>Common causes:<\/strong><\/p><ul class=\"[li_&amp;]:mb-0 [li_&amp;]:mt-1 [li_&amp;]:gap-1 [&amp;:not(:last-child)_ul]:pb-1 [&amp;:not(:last-child)_ol]:pb-1 list-disc flex flex-col gap-1 pl-8 mb-3\" dir=\"auto\" data-sourcepos=\"39:1-42:74;3058-3400\"><li class=\"font-claude-response-body whitespace-normal break-words pl-2\" data-sourcepos=\"39:1-39:84;3058-3141\">Your web server software (Nginx, Apache, LiteSpeed) has crashed or isn&#8217;t running.<\/li><li class=\"font-claude-response-body whitespace-normal break-words pl-2\" data-sourcepos=\"40:1-40:83;3142-3224\">A firewall on the origin server is blocking Cloudflare&#8217;s IP ranges specifically.<\/li><li class=\"font-claude-response-body whitespace-normal break-words pl-2\" data-sourcepos=\"41:1-41:102;3225-3326\">The web server is only listening on a port that doesn&#8217;t match what Cloudflare is configured to use.<\/li><li class=\"font-claude-response-body whitespace-normal break-words pl-2\" data-sourcepos=\"42:1-42:74;3327-3400\">The hosting provider suspended the server for billing or abuse reasons.<br \/><br \/><\/li><\/ul><p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"auto\" data-sourcepos=\"44:1-44:19;3402-3420\"><strong>How to fix it:<\/strong><\/p><p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"auto\" data-sourcepos=\"46:1-46:249;3422-3670\">SSH into your server and check whether the web server process is actually running. On most Linux setups, <code class=\"bg-text-200\/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]\">systemctl status nginx<\/code> or <code class=\"bg-text-200\/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]\">systemctl status apache2<\/code> will tell you immediately. If it&#8217;s stopped, restarting it often resolves 521 on its own.<br \/><br \/><\/p><p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"auto\" data-sourcepos=\"48:1-48:395;3672-4066\">If the service is running, check your firewall rules. Cloudflare publishes a current list of its IP ranges, and if your firewall (or a security plugin, or your host&#8217;s own network-level firewall) isn&#8217;t allowing traffic from those ranges, connections get silently dropped. This is one of the most common causes of 521 on servers that were working fine until a security update tightened the rules.<br \/><br \/><\/p><p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"auto\" data-sourcepos=\"50:1-50:205;4068-4272\">Confirm the port your web server is listening on matches what&#8217;s configured in your Cloudflare DNS and SSL\/TLS settings. A mismatch here, especially after a server migration, will produce this exact error.<br \/><br \/><\/p><h2 class=\"text-text-100 mt-3 -mb-1 text-[1.125rem] font-bold\" dir=\"auto\" data-sourcepos=\"52:1-52:29;4274-4302\"><strong>522: Connection Timed Out<\/strong><\/h2><p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"auto\" data-sourcepos=\"54:1-54:258;4304-4561\">This one means Cloudflare did make a connection attempt, but the origin server never completed the TCP handshake within the timeout window. It&#8217;s a step further than 521. The server isn&#8217;t outright refusing the connection; it&#8217;s just not answering fast enough.<br \/><br \/><\/p><p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"auto\" data-sourcepos=\"56:1-56:19;4563-4581\"><strong>Common causes:<\/strong><\/p><ul class=\"[li_&amp;]:mb-0 [li_&amp;]:mt-1 [li_&amp;]:gap-1 [&amp;:not(:last-child)_ul]:pb-1 [&amp;:not(:last-child)_ol]:pb-1 list-disc flex flex-col gap-1 pl-8 mb-3\" dir=\"auto\" data-sourcepos=\"58:1-61:116;4583-4997\"><li class=\"font-claude-response-body whitespace-normal break-words pl-2\" data-sourcepos=\"58:1-58:78;4583-4660\">The origin server is overloaded and too busy to respond to new connections.<\/li><li class=\"font-claude-response-body whitespace-normal break-words pl-2\" data-sourcepos=\"59:1-59:143;4661-4803\">A firewall is dropping Cloudflare&#8217;s packets silently instead of rejecting them outright, which causes a hang rather than an instant refusal.<\/li><li class=\"font-claude-response-body whitespace-normal break-words pl-2\" data-sourcepos=\"60:1-60:78;4804-4881\">Network routing issues between Cloudflare&#8217;s edge and your hosting provider.<\/li><li class=\"font-claude-response-body whitespace-normal break-words pl-2\" data-sourcepos=\"61:1-61:116;4882-4997\">SYN flood protection or rate limiting on the server is mistakenly treating Cloudflare&#8217;s connections as an attack.<br \/><br \/><\/li><\/ul><p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"auto\" data-sourcepos=\"63:1-63:19;4999-5017\"><strong>How to fix it:<\/strong><\/p><p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"auto\" data-sourcepos=\"65:1-65:245;5019-5263\">Check server load first. If CPU or memory is maxed out, new connections queue up and eventually time out even though the server is technically still running. A sudden traffic spike, a runaway process, or a misbehaving script can all cause this.<br \/><br \/><\/p><p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"auto\" data-sourcepos=\"67:1-67:371;5265-5635\">Review any DDoS protection or intrusion prevention system running on the server itself, separate from Cloudflare. Some hosting control panels ship with aggressive default rules that rate-limit or silently drop repeated connections from the same IP ranges, which is exactly the pattern Cloudflare&#8217;s edge servers produce since they connect from a shared pool of addresses.<br \/><br \/><\/p><p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"auto\" data-sourcepos=\"69:1-69:402;5637-6038\">If you&#8217;ve recently changed hosting providers or data centers, verify there isn&#8217;t a routing problem between Cloudflare and your new network. A quick way to test this is to temporarily pause Cloudflare (switch the DNS record to &#8220;DNS only&#8221; instead of proxied) and see if the site loads directly. If it does, the problem is specifically in how Cloudflare&#8217;s edge reaches your server, not the server itself.<br \/><br \/><\/p><h2 class=\"text-text-100 mt-3 -mb-1 text-[1.125rem] font-bold\" dir=\"auto\" data-sourcepos=\"71:1-71:30;6040-6069\"><strong>523: Origin Is Unreachable<\/strong><\/h2><p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"auto\" data-sourcepos=\"73:1-73:302;6071-6372\">This is different from the other two. It doesn&#8217;t mean Cloudflare tried to connect and failed, it means Cloudflare couldn&#8217;t even find a valid route to your origin&#8217;s IP address in the first place. This usually points to a DNS or network-level problem rather than anything happening on the server itself.<br \/><br \/><\/p><p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"auto\" data-sourcepos=\"75:1-75:19;6374-6392\"><strong>Common causes:<\/strong><\/p><ul class=\"[li_&amp;]:mb-0 [li_&amp;]:mt-1 [li_&amp;]:gap-1 [&amp;:not(:last-child)_ul]:pb-1 [&amp;:not(:last-child)_ol]:pb-1 list-disc flex flex-col gap-1 pl-8 mb-3\" dir=\"auto\" data-sourcepos=\"77:1-80:86;6394-6816\"><li class=\"font-claude-response-body whitespace-normal break-words pl-2\" data-sourcepos=\"77:1-77:109;6394-6502\">The DNS record in Cloudflare points to an IP address that&#8217;s outdated or no longer assigned to your server.<\/li><li class=\"font-claude-response-body whitespace-normal break-words pl-2\" data-sourcepos=\"78:1-78:133;6503-6635\">The origin server&#8217;s IP address changed (common after switching hosts or rebuilding a server) but the DNS record was never updated.<\/li><li class=\"font-claude-response-body whitespace-normal break-words pl-2\" data-sourcepos=\"79:1-79:95;6636-6730\">The hosting provider&#8217;s network is having an outage that makes the IP temporarily unroutable.<\/li><li class=\"font-claude-response-body whitespace-normal break-words pl-2\" data-sourcepos=\"80:1-80:86;6731-6816\">A private or reserved IP address was accidentally entered into a public DNS record.<br \/><br \/><\/li><\/ul><p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"auto\" data-sourcepos=\"82:1-82:19;6818-6836\"><strong>How to fix it:<\/strong><\/p><p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"auto\" data-sourcepos=\"84:1-84:252;6838-7089\">Log into your Cloudflare dashboard and check the DNS records for your domain. Confirm the A record (or AAAA record for IPv6) points to your server&#8217;s current, correct IP address. This is the single most common fix for 523, especially after a migration.<br \/><br \/><\/p><p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"auto\" data-sourcepos=\"86:1-86:354;7091-7444\">If the IP looks correct, confirm the server itself is actually online and reachable. From a different network, try to ping the IP directly or run a traceroute. If the IP doesn&#8217;t respond at all, the issue is on the hosting provider&#8217;s side, and you&#8217;ll need to check with them directly to confirm the server is truly offline rather than just misconfigured.<br \/><br \/><\/p><h2 class=\"text-text-100 mt-3 -mb-1 text-[1.125rem] font-bold\" dir=\"auto\" data-sourcepos=\"88:1-88:51;7446-7496\"><strong>How to tell which one you&#8217;re dealing with, fast<\/strong><\/h2><p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"auto\" data-sourcepos=\"90:1-90:475;7498-7972\">If you&#8217;re the one managing the site and a visitor reports the error, don&#8217;t guess. Log into Cloudflare and check the exact error code, since the fix is genuinely different for each one. If you don&#8217;t have immediate access to a report and just want to confirm the site is affected right now, a <a class=\"underline underline underline-offset-2 decoration-1 decoration-current\/40 hover:decoration-current focus:decoration-current\" href=\"https:\/\/checksitestatus.com\/website-down-checker\/\">website down checker<\/a> that pings from multiple external locations will confirm whether the outage is real and how widespread it is.<br \/><br \/><\/p><p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"auto\" data-sourcepos=\"92:1-92:324;7974-8297\">It&#8217;s also worth ruling out a Cloudflare-side outage before you start digging into your own server. Cloudflare&#8217;s own status page shows current incidents across its network, and while it&#8217;s rare for the issue to actually be on Cloudflare&#8217;s end, a quick check saves you from troubleshooting a server that was never the problem.<br \/><br \/><\/p><h2 class=\"text-text-100 mt-3 -mb-1 text-[1.125rem] font-bold\" dir=\"auto\" data-sourcepos=\"94:1-94:39;8299-8337\"><strong>A general troubleshooting checklist<\/strong><\/h2><p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"auto\" data-sourcepos=\"96:1-96:161;8339-8499\"><strong>When you&#8217;re not sure which of the three you&#8217;re facing, or you want to work through the problem systematically, this order tends to be the fastest path to a fix:<\/strong><\/p><ol class=\"[li_&amp;]:mb-0 [li_&amp;]:mt-1 [li_&amp;]:gap-1 [&amp;:not(:last-child)_ul]:pb-1 [&amp;:not(:last-child)_ol]:pb-1 list-decimal flex flex-col gap-1 pl-8 mb-3\" dir=\"auto\" data-sourcepos=\"98:1-104:89;8501-9082\"><li class=\"font-claude-response-body whitespace-normal break-words pl-2\" data-sourcepos=\"98:1-98:75;8501-8575\">Confirm the exact error code from Cloudflare&#8217;s error page or dashboard.<\/li><li class=\"font-claude-response-body whitespace-normal break-words pl-2\" data-sourcepos=\"99:1-99:62;8576-8637\">Check whether your web server process is actually running.<\/li><li class=\"font-claude-response-body whitespace-normal break-words pl-2\" data-sourcepos=\"100:1-100:68;8638-8705\">Verify your DNS records point to the correct, current origin IP.<\/li><li class=\"font-claude-response-body whitespace-normal break-words pl-2\" data-sourcepos=\"101:1-101:94;8706-8799\">Check firewall rules on the origin for anything blocking Cloudflare&#8217;s published IP ranges.<\/li><li class=\"font-claude-response-body whitespace-normal break-words pl-2\" data-sourcepos=\"102:1-102:108;8800-8907\">Test connecting to the origin directly, bypassing Cloudflare, to isolate where the failure is happening.<\/li><li class=\"font-claude-response-body whitespace-normal break-words pl-2\" data-sourcepos=\"103:1-103:86;8908-8993\">Check server resource usage (CPU, memory, open connections) for signs of overload.<\/li><li class=\"font-claude-response-body whitespace-normal break-words pl-2\" data-sourcepos=\"104:1-104:89;8994-9082\">Contact your hosting provider if the origin appears unreachable at the network level.<br \/><br \/><\/li><\/ol><h2 class=\"text-text-100 mt-3 -mb-1 text-[1.125rem] font-bold\" dir=\"auto\" data-sourcepos=\"106:1-106:53;9084-9136\"><strong>Preventing this from becoming a recurring problem<\/strong><\/h2><p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"auto\" data-sourcepos=\"108:1-108:774;9138-9911\">These errors tend to resurface if the underlying cause was something like a firewall rule or an outdated DNS record left over from a migration, since nothing about the setup actually changed after the first fix. Setting up monitoring directly against your origin server, not just through Cloudflare&#8217;s edge, catches this kind of drift before a visitor does. Our guide on <a class=\"underline underline underline-offset-2 decoration-1 decoration-current\/40 hover:decoration-current focus:decoration-current\" href=\"https:\/\/checksitestatus.com\/how-to-set-up-uptime-alerts-a-step-by-step-guide\/\">how to set up uptime alerts<\/a> covers how to configure checks that alert you the moment your server stops responding, and our <a class=\"underline underline underline-offset-2 decoration-1 decoration-current\/40 hover:decoration-current focus:decoration-current\" href=\"https:\/\/checksitestatus.com\/check-server-check-host-website-monitoring-online\/\">server and host checker<\/a> is useful for spot-checking origin reachability whenever you make network or hosting changes.<br \/><br \/><\/p><p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"auto\" data-sourcepos=\"110:1-110:364;9913-10276\">For a broader look at gateway-related errors that aren&#8217;t Cloudflare-specific, our guides on <a class=\"underline underline underline-offset-2 decoration-1 decoration-current\/40 hover:decoration-current focus:decoration-current\" href=\"https:\/\/checksitestatus.com\/what-does-502-bad-gateway-mean\/\">502 Bad Gateway<\/a> and <a class=\"underline underline underline-offset-2 decoration-1 decoration-current\/40 hover:decoration-current focus:decoration-current\" href=\"https:\/\/checksitestatus.com\/504-gateway-timeout\/\">504 Gateway Timeout<\/a> cover the same general problem, an upstream server failing to respond properly, in setups that don&#8217;t use Cloudflare.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-72cb555 elementor-widget elementor-widget-accordion\" data-id=\"72cb555\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"accordion.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-accordion\">\n\t\t\t\t\t\t\t<div class=\"elementor-accordion-item\">\n\t\t\t\t\t<div id=\"elementor-tab-title-1201\" class=\"elementor-tab-title\" data-tab=\"1\" role=\"button\" aria-controls=\"elementor-tab-content-1201\" aria-expanded=\"false\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-accordion-icon elementor-accordion-icon-left\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-accordion-icon-closed\"><i class=\"fas fa-plus\"><\/i><\/span>\n\t\t\t\t\t\t\t\t<span class=\"elementor-accordion-icon-opened\"><i class=\"fas fa-minus\"><\/i><\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t<a class=\"elementor-accordion-title\" tabindex=\"0\">What's the actual difference between 521, 522, and 523?<\/a>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<div id=\"elementor-tab-content-1201\" class=\"elementor-tab-content elementor-clearfix\" data-tab=\"1\" role=\"region\" aria-labelledby=\"elementor-tab-title-1201\"><p>521 means the origin server refused the connection outright. 522 means Cloudflare connected but got no response in time. 523 means Cloudflare couldn&#8217;t find a route to the origin&#8217;s IP address at all, which usually points to a DNS problem rather than the server itself.<\/p><\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t<div class=\"elementor-accordion-item\">\n\t\t\t\t\t<div id=\"elementor-tab-title-1202\" class=\"elementor-tab-title\" data-tab=\"2\" role=\"button\" aria-controls=\"elementor-tab-content-1202\" aria-expanded=\"false\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-accordion-icon elementor-accordion-icon-left\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-accordion-icon-closed\"><i class=\"fas fa-plus\"><\/i><\/span>\n\t\t\t\t\t\t\t\t<span class=\"elementor-accordion-icon-opened\"><i class=\"fas fa-minus\"><\/i><\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t<a class=\"elementor-accordion-title\" tabindex=\"0\">Is this Cloudflare's fault or my hosting provider's fault?<\/a>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<div id=\"elementor-tab-content-1202\" class=\"elementor-tab-content elementor-clearfix\" data-tab=\"2\" role=\"region\" aria-labelledby=\"elementor-tab-title-1202\"><p>In the large majority of cases, it&#8217;s an issue with the origin server, its firewall, or its DNS configuration, not Cloudflare. Cloudflare&#8217;s own outages are rare and usually show up on their public status page. Checking that page first can save you from troubleshooting a server that was never broken.<\/p><\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t<div class=\"elementor-accordion-item\">\n\t\t\t\t\t<div id=\"elementor-tab-title-1203\" class=\"elementor-tab-title\" data-tab=\"3\" role=\"button\" aria-controls=\"elementor-tab-content-1203\" aria-expanded=\"false\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-accordion-icon elementor-accordion-icon-left\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-accordion-icon-closed\"><i class=\"fas fa-plus\"><\/i><\/span>\n\t\t\t\t\t\t\t\t<span class=\"elementor-accordion-icon-opened\"><i class=\"fas fa-minus\"><\/i><\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t<a class=\"elementor-accordion-title\" tabindex=\"0\">How do I check if my firewall is blocking Cloudflare?<\/a>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<div id=\"elementor-tab-content-1203\" class=\"elementor-tab-content elementor-clearfix\" data-tab=\"3\" role=\"region\" aria-labelledby=\"elementor-tab-title-1203\"><p>Check your server&#8217;s firewall logs for dropped or rejected connections from IP ranges published on Cloudflare&#8217;s official IP list. If you see repeated blocks from those ranges around the time the errors started, that firewall rule is almost certainly the cause.<\/p><\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t<div class=\"elementor-accordion-item\">\n\t\t\t\t\t<div id=\"elementor-tab-title-1204\" class=\"elementor-tab-title\" data-tab=\"4\" role=\"button\" aria-controls=\"elementor-tab-content-1204\" aria-expanded=\"false\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-accordion-icon elementor-accordion-icon-left\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-accordion-icon-closed\"><i class=\"fas fa-plus\"><\/i><\/span>\n\t\t\t\t\t\t\t\t<span class=\"elementor-accordion-icon-opened\"><i class=\"fas fa-minus\"><\/i><\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t<a class=\"elementor-accordion-title\" tabindex=\"0\">Will every visitor see this error, or just some?<\/a>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<div id=\"elementor-tab-content-1204\" class=\"elementor-tab-content elementor-clearfix\" data-tab=\"4\" role=\"region\" aria-labelledby=\"elementor-tab-title-1204\"><p>Since this is a server-to-server failure between Cloudflare and your origin, it typically affects every visitor equally, regardless of their location or device. If only some visitors are affected, the more likely explanation is a regional network routing issue rather than the origin being fully down.<\/p><\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t<div class=\"elementor-accordion-item\">\n\t\t\t\t\t<div id=\"elementor-tab-title-1205\" class=\"elementor-tab-title\" data-tab=\"5\" role=\"button\" aria-controls=\"elementor-tab-content-1205\" aria-expanded=\"false\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-accordion-icon elementor-accordion-icon-left\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-accordion-icon-closed\"><i class=\"fas fa-plus\"><\/i><\/span>\n\t\t\t\t\t\t\t\t<span class=\"elementor-accordion-icon-opened\"><i class=\"fas fa-minus\"><\/i><\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t<a class=\"elementor-accordion-title\" tabindex=\"0\">Can I test my origin server without going through Cloudflare?<\/a>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<div id=\"elementor-tab-content-1205\" class=\"elementor-tab-content elementor-clearfix\" data-tab=\"5\" role=\"region\" aria-labelledby=\"elementor-tab-title-1205\"><p>Yes. Temporarily set the DNS record for that domain to &#8220;DNS only&#8221; in Cloudflare instead of proxied, or edit your local hosts file to point the domain directly at your origin&#8217;s IP address. If the site loads normally that way, the problem is specifically in the connection between Cloudflare and your server, not the server&#8217;s ability to serve the site.<\/p><\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t<script type=\"application\/ld+json\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@type\":\"FAQPage\",\"mainEntity\":[{\"@type\":\"Question\",\"name\":\"What's the actual difference between 521, 522, and 523?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"<p>521 means the origin server refused the connection outright. 522 means Cloudflare connected but got no response in time. 523 means Cloudflare couldn&#8217;t find a route to the origin&#8217;s IP address at all, which usually points to a DNS problem rather than the server itself.<\\\/p>\"}},{\"@type\":\"Question\",\"name\":\"Is this Cloudflare's fault or my hosting provider's fault?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"<p>In the large majority of cases, it&#8217;s an issue with the origin server, its firewall, or its DNS configuration, not Cloudflare. Cloudflare&#8217;s own outages are rare and usually show up on their public status page. Checking that page first can save you from troubleshooting a server that was never broken.<\\\/p>\"}},{\"@type\":\"Question\",\"name\":\"How do I check if my firewall is blocking Cloudflare?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"<p>Check your server&#8217;s firewall logs for dropped or rejected connections from IP ranges published on Cloudflare&#8217;s official IP list. If you see repeated blocks from those ranges around the time the errors started, that firewall rule is almost certainly the cause.<\\\/p>\"}},{\"@type\":\"Question\",\"name\":\"Will every visitor see this error, or just some?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"<p>Since this is a server-to-server failure between Cloudflare and your origin, it typically affects every visitor equally, regardless of their location or device. If only some visitors are affected, the more likely explanation is a regional network routing issue rather than the origin being fully down.<\\\/p>\"}},{\"@type\":\"Question\",\"name\":\"Can I test my origin server without going through Cloudflare?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"<p>Yes. Temporarily set the DNS record for that domain to &#8220;DNS only&#8221; in Cloudflare instead of proxied, or edit your local hosts file to point the domain directly at your origin&#8217;s IP address. If the site loads normally that way, the problem is specifically in the connection between Cloudflare and your server, not the server&#8217;s ability to serve the site.<\\\/p>\"}}]}<\/script>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>If you&#8217;re running a site behind Cloudflare and a visitor suddenly sees an orange error screen with a number like 521, 522, or 523, the problem isn&#8217;t Cloudflare itself. It&#8217;s almost always your origin server, the actual machine hosting your website, that Cloudflare can&#8217;t reach. These three codes look similar and get mixed up constantly, [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":7228,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[50],"tags":[407,408,409,413,411,414,415,412,410,100],"class_list":["post-7227","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-cloudflare-521-error","tag-cloudflare-522-error","tag-cloudflare-523-error","tag-cloudflare-5xx-errors","tag-connection-timed-out","tag-fix-cloudflare-error","tag-origin-server-down","tag-origin-unreachable","tag-web-server-is-down","tag-website-monitoring"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/checksitestatus.com\/fr\/wp-json\/wp\/v2\/posts\/7227","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/checksitestatus.com\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/checksitestatus.com\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/checksitestatus.com\/fr\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/checksitestatus.com\/fr\/wp-json\/wp\/v2\/comments?post=7227"}],"version-history":[{"count":7,"href":"https:\/\/checksitestatus.com\/fr\/wp-json\/wp\/v2\/posts\/7227\/revisions"}],"predecessor-version":[{"id":7235,"href":"https:\/\/checksitestatus.com\/fr\/wp-json\/wp\/v2\/posts\/7227\/revisions\/7235"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/checksitestatus.com\/fr\/wp-json\/wp\/v2\/media\/7228"}],"wp:attachment":[{"href":"https:\/\/checksitestatus.com\/fr\/wp-json\/wp\/v2\/media?parent=7227"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/checksitestatus.com\/fr\/wp-json\/wp\/v2\/categories?post=7227"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/checksitestatus.com\/fr\/wp-json\/wp\/v2\/tags?post=7227"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}