Make money with Oziconnect referral program

The fact that you’re here suggests that your website visitors are seeing error code 521 when they type a URL into their browser. That means customers can’t access her website.

Knowing that such downtime can occur 91% of businesses spend more than $300,000Let’s briefly understand what error 521 means and how to troubleshoot it.

Here’s what we’ll cover:

error code 521

Error code 521, or “Error 521: Web server is down,” is an error that visitors see when Cloudflare is unable to contact your website’s server.. This means that your visitors can access your content delivery network (CDN)’s servers, but the CDN cannot access you.

Common causes for this error include an unavailable web server, incorrect Cloudflare configuration, or an invalid Secure Sockets Layer (SSL) certificate.

How to fix error code 521

Now that you know what error 521 is, let’s see how to troubleshoot it.

1. Make sure your website is online

When you configure Cloudflare as a reverse proxy for your website’s server, Cloudflare acts as a bridge between your customers and your website. Website visitors pass through this bridge to find her website on the other side.

If a visitor encounters error 521, the first thing they should do is check whether the bridge destination is still online.

can be used curl Use commands to directly interact with your website’s server and request a response.

Open a command prompt or terminal (if you’re using macOS or Linux) and enter the following code.

curl –silent –output /dev/null –write-out “%http_code” https://yourwebsite.com

Note: Replace “” with your website URL.

The output is in the form of an HTTP status code. 200, the website’s server is online.

For example, the output of this code when using cURL to interact with a website is:

If you don’t want to use Command Prompt or Terminal, try the following: KeyCDN’s HTTP Header Checker.

However, if you receive a 5xx status code, it means that the server is unable to respond to your request and a server error has occurred.

Note: If you get HTTP code 301, don’t worry. This means that WordPress has set a 301. Redirection from non-WWW to WWW URLs, or vice versa. This usually happens if the default address of the website is “” and you enter “. If you enter the correct address, you will get the actual response code.

If you’re having trouble with your server, contact your hosting provider‘s support team to find out if their server is undergoing maintenance. You can also check your hosting provider‘s status page to see if their servers are offline.

Alternatively, if your hosting provider doesn’t offer immediate support, you can also check the error logs via cPanel to troubleshoot server issues.

If your hosting provider‘s servers suffer from frequent downtime, consider Nexcess.We will definitely provide Almost 100% uptime On all hosting plans. Moreover, our professional support team will help you with any technical issues 24/7.

2. Remove blockers between Cloudflare and websites

If your website is online, error 521 may be caused by a misconfiguration that prevents Cloudflare from accessing your website’s files.

The problem may be with your .htaccess file, IP blocker rules, or security plugins. Let’s take a look at how to fix each.

Whitelist Cloudflare IP addresses in your .htaccess file

Cloudflare uses a set of IP addresses to direct incoming traffic to your web servers. Make sure all these IP addresses are whitelisted or allowed by your web server.

Here’s how to whitelist IP addresses in your server configuration:

1. .htaccess file via FTP client Or use cPanel’s file manager.

2. Add the following code.

order deny, allow
deny from all

3.Add allow from [Cloudflare IP addresses].Exchange [Cloudflare IP addresses] Each line displays one real IP address, as shown in the image below.

4. Save the .htaccess file.

Check your IP blocker settings

If you’re using a cPanel-based host, an IP blocker allows you to block websites from a specific IP address or range of IP addresses.

Check your IP blocker settings to make sure one of your administrators didn’t accidentally add the Cloudflare IP range.

Disable security plugins

A security or firewall plugin may be blocking Cloudflare requests. To rule out that possibility, disable the plugin and see if error 521 is resolved. If resolved, please contact the plugin developer or replace the security plugin.

3. Check Cloudflare’s DNS settings

Log in to your Cloudflare account and navigate to: [yourwebsite.com] > DNS > record.

Once you get there, make sure everyone has the content a The record matches the IP address of the origin web server and its contents are CNAME The record includes the website’s domain name.

If one of the records is incorrect, you can change the record by clicking. edit.

4. Install enabled SSL on the original web server.

If you have configured your SSL/TLS settings in Cloudflare as follows: full (strict)Cloudflare performs certificate validation between Cloudflare itself and your servers.

Additionally, Cloudflare will terminate your connection if your website’s SSL certificate is found to be expired, self-signed, or doesn’t match your domain. In that case, the visitor’s web browser will display error 521.

To resolve this issue, you may need to install a Cloudflare Origin Certificate Authority (CA) certificate on your server. To obtain your Cloudflare Origin CA certificate, go to: [yourwebsite.com] > SSL/TLS > origin server and click Creating a certificate.

Then you can do the following Add Cloudflare’s origin certificate to your web server Follow your hosting provider‘s instructions.

However, if you manage sensitive data or need to comply with PCI-DSS requirements, you may be better off using a premium SSL certificate.

5. Deactivate mod_reqtimeout and mod_antiloris.

You may have enabled mod_reqtimeout and mod_antiloris Use modules on the Apache HTTP server to prevent denial of service (DoS) and distributed denial of service (DDoS) attacks. This module protects your web server from these attacks by limiting the number of times an IP server can connect to the server.

mod_reqtimeout and mod_antiloris act as a protective shield for your hosting server, but may cause incompatibility issues with Cloudflare.

For example, Cloudflare relies on a limited number of IP addresses to direct traffic to its servers, and continuous connection attempts can cause the module to block those addresses.

6. Contact customer support

If none of the above solutions work, seek outside help.

Go to get Cloudflare support via ticket, chat, or phone. support > Contact Cloudflare If your website works fine without Cloudflare’s CDN.

If your website’s hosting server is down, contact your web hosting provider‘s support team. With Nexcess, you get 24/7 support from expert technicians who will take care of your troubleshooting from start to finish, so you can focus on other business tasks.

Final Thoughts: 6 Ways to Fix Cloudflare Error Code 521 on WordPress

If you run an e-commerce business or manage a company, you don’t want to see error code 521 for too long. Every time a website remains inaccessible, more money is left in your pocket.

The above tips will help you fix the error as soon as possible. However, prevention is better than cure.

At Nexcess, you rarely have to worry about error 521 because our experts handle your server configuration. Not to mention, our enterprise hosting plans come with 24/7 support from our elite technicians who are always on standby should anything go wrong. .

Plus, try the free built-in Nexcess Edge CDN powered by Cloudflare to fix error code 521 because Nexcess experts handle everything for you, as opposed to Cloudflare itself, which requires you to manually configure Cloudflare itself. You can also avoid it.

Check out our hosting plans to get started today.

Make money with Oziconnect referral program
Make money with Oziconnect referral program
Make money with Oziconnect referral program
Make money with Oziconnect referral program
84512

About Us

We are a leading IT agency in Lagos, Nigeria, providing IT consulting and custom software development services. We offer a wide range of IT solutions across software development, web and mobile application development, blockchain development services, digital marketing, and branding.

Contact Us

25B Lagos-Abekouta Expressway Lagos

info@ozitechgroup.com

Phone: (234) 907 155 5545

@2023 OzitechGroup – All Right Reserved.