If your website displays Error 522: Connection timed out, visitors may be unable to access your website even though your domain is configured to use Cloudflare.
This error can be frustrating, particularly when your website generates enquiries, processes orders or provides essential information to customers. The good news is that Error 522 does not necessarily mean your website has been hacked or that your website files have disappeared.
In most cases, the error indicates that Cloudflare could not establish a timely connection to your origin server or that the server did not respond to the connection attempt as expected.
Understanding what causes Cloudflare Error 522 is the first step towards restoring your website.
This guide explains what the error means, the most common causes, how to troubleshoot it and when to contact your hosting provider.
What Is Cloudflare Error 522?
Cloudflare Error 522 is a connection timeout error associated with communication between Cloudflare and the server hosting your website.
When Cloudflare acts as a reverse proxy, a visitor’s request passes through Cloudflare before reaching your origin server. Cloudflare then communicates with the origin to retrieve the content needed to serve the request.
If the connection cannot be established promptly, or the origin server does not acknowledge the connection attempt within the expected time, Cloudflare may return Error 522.
The problem may be related to the hosting server, network connectivity, firewall configuration or server resource exhaustion.
For example, imagine that a customer visits your online store to place an order. Their browser connects to Cloudflare, but Cloudflare cannot communicate successfully with your hosting server. Instead of displaying your store, the customer sees an error page.
The website may still be present on the server. The immediate problem is that the connection between Cloudflare and the origin is not working correctly.
What Causes Cloudflare Error 522?
Several issues can cause a website to display Error 522. Identifying the actual cause is more useful than repeatedly changing Cloudflare settings without investigating the server.
1. Your Hosting Server Is Offline
One of the first things to investigate is whether the origin server is running and accepting connections.
The server may be temporarily unavailable because of maintenance, a service failure, an unexpected restart or a wider infrastructure problem.
If the web server has stopped responding, Cloudflare may be unable to retrieve your website’s content.
Check your hosting provider’s service status, if available, and inspect the server through your hosting control panel or management interface.
If you cannot access the server or establish whether it is running, contact your hosting provider and ask them to investigate.
2. Your Server Is Overloaded
A server under heavy load may struggle to accept new connections or respond within the expected time.
This can happen when a website experiences a sudden traffic increase, resource-intensive applications consume too much CPU or memory, or automated requests place excessive pressure on the server.
WordPress websites can also experience performance problems because of inefficient plugins, expensive database queries or poorly optimised code.
If the server is running but the website continues to time out, check CPU utilisation, memory consumption, disk activity and web server logs.
If resource usage remains high, you may need to optimise the application, investigate unusual traffic or upgrade the hosting resources.
Simply increasing server resources without identifying the underlying cause may not resolve the problem.
3. Your Firewall Is Blocking Cloudflare
Your origin server may be running normally while a firewall blocks or interferes with connections from Cloudflare.
Server firewalls, security software and hosting-provider network controls can affect incoming connections. Some configurations may also apply restrictions that unintentionally interfere with legitimate traffic.
Check whether the server’s firewall or security rules are blocking Cloudflare’s published IP ranges.
If your server administrator uses an IP allowlist, confirm that it contains the appropriate current Cloudflare ranges for the traffic being proxied.
Do not disable the firewall entirely as a troubleshooting shortcut. Doing so can expose the server to unnecessary risk.
Instead, identify the specific rule causing the problem and make the smallest appropriate correction.
4. Your DNS Records Point to the Wrong Server
Cloudflare needs to send requests to the correct origin server.
If the relevant DNS record contains an outdated IP address, Cloudflare may attempt to connect to a server that no longer hosts your website.
This can occur after changing hosting providers, moving a website to a new server or updating the hosting configuration without updating the corresponding DNS records.
Review the relevant DNS records in your Cloudflare dashboard and compare the destination with the IP address supplied by your hosting provider.
Make sure you are checking the correct hostname and record.
If your website uses separate configurations for the root domain and www, verify both.
Avoid changing unrelated records, particularly those used by email services or other applications.
5. Your Hosting Provider Is Experiencing Network Problems
Sometimes the problem is not caused by your website or Cloudflare configuration.
A network interruption, routing issue or infrastructure problem between Cloudflare and your hosting server may prevent connections from completing successfully.
In this situation, your website may work intermittently or fail only from certain network locations.
Check whether the hosting provider has reported an incident. If you have access to server logs or network diagnostics, use them to establish whether connection attempts are reaching the origin.
Your hosting provider may need to investigate network connectivity beyond the website’s application.
6. Your Website Migration Was Not Completed Correctly
A recent website migration is another reason to investigate Error 522.
If you moved your website to a different hosting provider or server, Cloudflare may still be sending requests to the old IP address.
Alternatively, the new server may not be configured to accept the expected connections.
Review the migration records and confirm that the website files, database and server configuration are ready.
Then verify the relevant Cloudflare DNS records, the new server’s firewall rules and its ability to accept the required web traffic.
Keep the old hosting environment available during the transition where practical. This can help you investigate problems without losing access to the previous installation.
How to Fix Cloudflare Error 522 Step by Step
The following troubleshooting process helps you identify whether the problem is related to the origin server, DNS, firewall configuration or another underlying issue.
Step 1: Confirm That the Website Is Actually Unavailable
Start by opening your website in a fresh browser session.
Check the root domain and the www version if both are configured. If possible, test from another device or network.
Record the error message and when the problem started.
If the website was working previously, establish whether anything changed shortly before the error appeared. Recent hosting migrations, firewall updates, DNS changes and application deployments can provide useful clues.
Do not repeatedly change settings before understanding the problem.
Step 2: Check Your Hosting Server
Log in to your hosting control panel or server management interface, if available.
Determine whether the server is online and whether the relevant web server service is running.
For a managed hosting account, ask the provider to check the server’s health and confirm that the website is responding normally.
For a VPS or dedicated server that you administer yourself, inspect the relevant system and web server logs.
If the server is offline, unresponsive or experiencing resource exhaustion, address that issue before making unrelated Cloudflare changes.
Step 3: Verify Your Cloudflare DNS Records
Open the DNS section of your Cloudflare dashboard.
Identify the records used by your website and compare their destinations with the correct origin-server details.
If you recently changed hosting providers, confirm that the relevant records point to the new server.
Remember that DNS configuration depends on the actual setup. Do not assume every hostname should point to the same address or that every record should be proxied.
After correcting a record, allow for the relevant DNS and connection changes to take effect, then test the website again.
Step 4: Review Firewall and Security Rules
If the server is running and the DNS destination is correct, investigate whether the origin is allowing the required connections.
Review server firewall rules, security software and any hosting-provider restrictions that may affect inbound web traffic.
If your configuration restricts connections by source IP address, verify that the appropriate Cloudflare IP ranges are allowed where necessary.
Make changes carefully and test the result. Avoid opening unnecessary ports or removing security controls simply to make the error disappear.
Step 5: Investigate Server Resource Usage
If the server is reachable but connections are timing out, investigate its workload.
Check whether CPU, RAM or disk usage is unusually high. Look for application errors, database problems and unusual request patterns that may be affecting performance.
For WordPress websites, examine recently installed plugins, themes and updates if the timing suggests a connection.
If the server is consistently running out of resources, you may need to optimise the application, reduce unnecessary workloads or move to a more suitable hosting plan.
Step 6: Contact Your Hosting Provider
If you have checked the relevant DNS settings and the website remains unavailable, contact your hosting provider.
Provide the exact error message, the affected domain, when the problem began and any changes made shortly beforehand.
Ask the provider to check whether the origin server is accepting connections from Cloudflare, whether firewall rules are interfering with requests and whether server resources or network problems are contributing to the timeout.
Specific diagnostic information is much more useful than simply reporting that the website is down.
Step 7: Test the Website After the Fix
Once the underlying problem has been corrected, open the website again and verify that it loads normally.
Test important pages and functions, including contact forms, account logins and checkout processes where applicable.
If the website has been unavailable for an extended period, continue monitoring it to ensure the issue does not recur.
If the error returns, investigate the underlying cause rather than assuming the problem has been permanently resolved.
Does Cloudflare Error 522 Mean Your Website Has Been Hacked?
No. Error 522 does not, by itself, prove that your website has been hacked.
The error is associated with a connection timeout between Cloudflare and the origin server. It can occur because of ordinary server, network, firewall or DNS problems.
However, if the error appeared alongside other suspicious activity, you should investigate the wider situation.
Unexpected administrator accounts, unfamiliar files, unauthorised changes, suspicious redirects or unusual login activity may justify a separate security investigation.
If you suspect a compromise, preserve relevant logs where possible, secure administrative access and seek appropriate technical assistance.
Do not assume that restoring connectivity alone resolves a possible security incident.
Can Cloudflare Error 522 Be Caused by a WordPress Plugin?
A WordPress plugin can contribute indirectly to a timeout if it causes excessive resource consumption, triggers expensive database queries or otherwise places a heavy workload on the server.
However, Error 522 is not automatically a plugin problem.
If the error began after installing or updating a plugin, investigate the timing and review the server logs.
If you have a safe way to test the site, temporarily disabling the suspected plugin may help isolate the cause. Avoid making changes to a live production website without a suitable backup and recovery plan.
If the problem affects the entire server or the connection cannot be established at all, investigate server availability, DNS and firewall configuration as well.
How to Reduce the Risk of Future Cloudflare Errors
You cannot eliminate every possible cause of a connection timeout, but good operational practices can reduce avoidable problems.
Start with suitable hosting resources. Your server should be capable of handling the normal workload of your website, with sufficient capacity for reasonable increases in traffic.
Keep WordPress, themes, plugins and server software appropriately maintained. Outdated software and inefficient applications can introduce security and performance problems.
Review firewall rules carefully whenever you change your Cloudflare or hosting configuration. A security rule that was appropriate for one setup may not work correctly after a migration or infrastructure change.
Maintain reliable backups and know how to restore your website if an update or configuration change causes problems.
Finally, monitor website availability and server health so you can identify recurring issues before they become prolonged outages.
If your business relies on its website, establish a clear process for escalating technical incidents to your hosting provider or server administrator.
Need Help Fixing Cloudflare Error 522?
When a website displays Error 522, the priority is to identify why Cloudflare cannot communicate successfully with the origin server.
For some websites, the solution may be a simple DNS correction. Others may require investigation of server resources, firewall rules, network connectivity or the hosting environment.
Tremhost provides hosting services and Cloudflare-based website protection through its Armor offerings. If you need assistance with a website outage or suspect a security incident, you can contact the technical team to establish which support service is appropriate for your situation.
For urgent website security incidents, review Tremhost Armor SOS and confirm the current scope of incident-response assistance.
If you are reviewing your website’s ongoing protection, you can also explore Tremhost Armor Guard.
The right solution depends on the cause of the error. A security subscription alone will not resolve every server, DNS or network problem, so make sure the underlying issue is properly diagnosed.
Frequently Asked Questions About Cloudflare Error 522
What does Cloudflare Error 522 mean?
Cloudflare Error 522 means that Cloudflare could not establish a timely connection to your website’s origin server or did not receive the expected response to the connection attempt.
How do I fix Error 522 quickly?
Start by checking whether your hosting server is online. Then verify the relevant Cloudflare DNS records, inspect firewall rules and check for server resource problems. If you cannot access the server, contact your hosting provider.
Is Error 522 a Cloudflare problem or a hosting problem?
It can involve the hosting server, network connectivity, firewall configuration or DNS settings. Cloudflare displays the error, but the underlying cause must be identified through troubleshooting.
Will restarting my server fix Error 522?
It might help if the server or a relevant service has stopped responding, but restarting is not a universal solution. Investigate the cause first where possible, particularly if the problem is recurring.
Can changing DNS fix Error 522?
Correcting an outdated or incorrect DNS destination can resolve the problem when Cloudflare is connecting to the wrong server. However, DNS changes will not fix an overloaded server, a blocking firewall rule or an unrelated network issue.
Does Error 522 affect Google rankings?
A prolonged website outage can affect search engine crawling and, if it continues, may negatively affect search visibility. A brief incident does not automatically mean your rankings will drop. Restore availability promptly and monitor the website after the fix.
Who should I contact if Error 522 keeps happening?
Contact your hosting provider or server administrator and provide the affected domain, the error message, the time the issue occurred and any recent configuration changes. If you suspect a security incident, seek appropriate incident-response assistance as well.
Final Thoughts
Cloudflare Error 522 can interrupt access to your website, but the error itself does not identify the exact cause.
Check the origin server first, verify the relevant DNS records, investigate firewall restrictions and review resource usage. If those checks do not resolve the issue, your hosting provider may need to investigate network connectivity and server health.
Is your website displaying Error 522? Start by identifying the cause instead of changing settings at random. If you need assistance with a website security incident, visit Tremhost Armor SOS to review the available support options.


