{"id":2938,"date":"2019-10-23T17:32:08","date_gmt":"2019-10-23T09:32:08","guid":{"rendered":"https:\/\/www.mondoze.com\/guide\/?post_type=kb&#038;p=2938"},"modified":"2022-10-05T08:00:29","modified_gmt":"2022-10-05T00:00:29","slug":"error-521-web-server-is-down","status":"publish","type":"kb","link":"https:\/\/www.mondoze.com\/guide\/kb\/error-521-web-server-is-down","title":{"rendered":"Error 521: Web server is down"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"2938\" class=\"elementor elementor-2938\" data-elementor-settings=\"[]\">\n\t\t\t\t\t\t<div class=\"elementor-inner\">\n\t\t\t\t\t\t\t<div class=\"elementor-section-wrap\">\n\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-18b48933 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"18b48933\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-493ce7cb\" data-id=\"493ce7cb\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-825e030 elementor-widget elementor-widget-heading\" data-id=\"825e030\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Error 521: Web Server is Down<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-77373836 elementor-widget elementor-widget-text-editor\" data-id=\"77373836\" data-element_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<div class=\"elementor-text-editor elementor-clearfix\">\n\t\t\t\t<p>Error 521 occurs because the origin web server refuses a connection from Cloudflare. More specifically,\u00a0Cloudflare tried to connect to your origin server on port 80 or 443 but received a\u00a0<em>connection refused<\/em> error.\u00a0<\/p><p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-6437 size-full\" src=\"https:\/\/www.mondoze.com\/guide\/wp-content\/uploads\/2021\/03\/OEse8gYfil0byjOZyDPtA6WgAGEsn9brvQ.png\" alt=\"Error521\" width=\"1439\" height=\"874\" \/><\/p><hr \/><h3><strong>Common causes<\/strong><\/h3><p>The two most common causes leading to Error 521 are:<\/p><h4><strong>The web server is offline<\/strong><\/h4><p>The origin web server process (e.g. Apache or Nginx) might not be running or has crashed. In that case:<\/p><ul><li style=\"list-style-type: none;\"><ul><li>Ensure your web server is running normally.<\/li><li>Review the server&#8217;s error logs to see what is causing the error.<\/li><\/ul><\/li><\/ul><p>If you&#8217;re unable to perform these tasks, contact your host provider.<\/p><h4><strong>Cloudflare requests are block<\/strong><\/h4><p>The origin web server or hosting provider&#8217;s network might be blocking Cloudflare&#8217;s requests.<\/p><p>As a reverse proxy, Cloudflare connects to your server from a Cloudflare IP and all subsequent traffic comes exclusively from a smaller set of Cloudflare IPs. As a result, certain server-side security solutions might mistake the increase in legitimate connections from this smaller set of IPs as an attack. This results in some<\/p><p>Cloudflare IPs being block or rate-limit.<\/p><p>To resolve this issue, whitelist all Cloudflare IP ranges in your server&#8217;s firewall or any other security software at the origin. See the list of\u00a0<a href=\"https:\/\/www.cloudflare.com\/ips\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Cloudflare IP ranges<\/a>.<\/p><p>If you&#8217;re unable to whitelist Cloudflare IPs, contact your host provider.<\/p><hr \/><h3><strong>Troubleshoot Error 521<\/strong><\/h3><p>You can use third-party tools like\u00a0<em>cURL<\/em>\u00a0or\u00a0<em>Telnet<\/em>\u00a0to test origin server response.<\/p><p>For the example commands shown below, you need to replace IP address\u00a0<em>1.2.3.4<\/em>\u00a0with the IP address of your origin server. Also, you can run these tests against port 443.<\/p><h3><strong>Test with cURL<\/strong><\/h3><p>cURL allows you to simulate a HTTP request, so it is a good tool for checking that your origin server is working properly. You can run cURL via the\u00a0<strong>Terminal<\/strong>\u00a0command line tool on Mac OS or Linux.<\/p><p>Run a cURL command against your server IP using the\u00a0<em>A<\/em>\u00a0record or\u00a0<em>CNAME<\/em>\u00a0for your domain shown in the\u00a0<strong>DNS<\/strong>app of the Cloudflare dashboard.<\/p><p>curl -v<\/p><p>If successful, you should see an\u00a0<em>HTTP 200<\/em>\u00a0response along with the HTML of your website. A failed cURL request looks similar to this:<\/p><p># curl 1.2.3.4<\/p><p>curl: (7) Failed to connect to 1.2.3.4 port 80: Connection refused<\/p><h3><strong>Test with Telnet<\/strong><\/h3><p>Windows users can test a connection using\u00a0<strong>Telnet<\/strong>\u00a0(via the\u00a0<strong>Command Prompt<\/strong>).<\/p><p>Run a command similar to this:<\/p><p>telnet 1.2.3.4 80<\/p><p>An error, such as:<\/p><p>Unable to connect to remote host: Connection refused<\/p><p>means that your web server isn\u2019t running or is blocking requests.<\/p><p>A refused connection error would look similar to this:<\/p><p># telnet 1.2.3.4 80 Trying 1.2.3.4&#8230; telnet: connect to address 1.2.3.4: Connection refused telnet: Unable to connect to remote host<\/p>\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\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Error 521: Web Server is Down Error 521 occurs because the origin web server refuses a connection from Cloudflare. More specifically,\u00a0Cloudflare tried to connect to your origin server on port 80 or 443 but received a\u00a0connection refused error.\u00a0 Common causes The two most common causes leading to Error 521 are: The web server is offline &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/www.mondoze.com\/guide\/kb\/error-521-web-server-is-down\"> <span class=\"screen-reader-text\">Error 521: Web server is down<\/span> Read More \u00bb<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}}},"kbtopic":[53],"kbtag":[110],"mkb_version":[],"_links":{"self":[{"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kb\/2938"}],"collection":[{"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kb"}],"about":[{"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/types\/kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/comments?post=2938"}],"version-history":[{"count":7,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kb\/2938\/revisions"}],"predecessor-version":[{"id":18284,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kb\/2938\/revisions\/18284"}],"wp:attachment":[{"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/media?parent=2938"}],"wp:term":[{"taxonomy":"kbtopic","embeddable":true,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kbtopic?post=2938"},{"taxonomy":"kbtag","embeddable":true,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kbtag?post=2938"},{"taxonomy":"mkb_version","embeddable":true,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/mkb_version?post=2938"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}