Error 1004
Error 1004 Connection timed out Error
What This Error Means
Error 1004 indicates that Cloudflare was unable to establish a connection with the origin web server within the allotted time. This often means the origin server is unavailable or is taking too long to respond to Cloudflare's requests. Cloudflare acts as a reverse proxy, so it needs to connect to the origin to retrieve content.
Common Causes
- The origin server is down or unresponsive.
- The origin server's firewall is blocking Cloudflare's IP addresses.
- The origin server is experiencing high traffic or resource exhaustion.
- DNS resolution issues preventing Cloudflare from finding the origin server's IP address.
- Network connectivity issues between Cloudflare and the origin server.
How to Fix It (For Users)
- 1 Try refreshing the page after a few minutes.
- 2 Check your internet connection to ensure you can access other websites.
- 3 If the problem persists, contact the website owner or administrator.
For Site Owners / Developers
- Verify that your origin server is running and accessible from the internet.
- Check your origin server's firewall to ensure it is not blocking Cloudflare's IP ranges (available on Cloudflare's website).
- Monitor your origin server's resource usage (CPU, memory, disk I/O) to identify potential bottlenecks.
- Review your origin server's logs for any errors or warnings related to connections from Cloudflare.
- Ensure your DNS records are correctly configured and resolving to the correct IP address for your origin server. Consider using a DNS health checking service to monitor DNS resolution.
- Investigate network connectivity between Cloudflare's data centers and your origin server. Use tools like traceroute to identify any potential network issues.
- If using a load balancer in front of your origin servers, verify its health checks are properly configured and that all origin servers are healthy.
- If you've recently made changes to your server configuration, revert the changes to see if that resolves the issue.
- Increase the connection timeout on your origin server to allow more time for Cloudflare to establish a connection. However, be mindful of the potential impact on overall performance.
- Consider using Cloudflare Argo to improve routing between Cloudflare and your origin server.
When It Is NOT Your Fault
The issue could be caused by a temporary outage or network problem at Cloudflare's end or with upstream providers. In such cases, the problem usually resolves itself within a short period. Check Cloudflare's system status page for any reported incidents.
Check if this outage affects everyone globally
This error often indicates a wider problem. Use our tool to verify if the site is down for everyone.
Check Website Status →Recommended Tool to Prevent This Error
Prevent server timeouts and resource exhaustion with scalable cloud infrastructure.