Skip to main content

How do I fix the WooCommerce 520 error

Error 520 is a message received from the server indicating that the response sent to the server is delivered as an invalid HTTP response.

Written by Jessica Risch
Updated over 2 weeks ago

Introduction

A 520 error is a diagnostic message indicating that your server returned an invalid or empty response to a request. It often acts as a "catch-all" for issues where the server is unable to process a request correctly or the response is too large for intermediary services (like Cloudflare) to handle.

Problem

You will encounter this error when:

  • Your website displays "Error 520: Web server is returning an unknown error".

  • The server crashes due to excessive resource usage.

  • Large headers or cookies make the response unreadable for the gateway.

How to solve

Follow these steps to identify and fix the cause of the 520 error:

  1. Isolate Cloudflare: Temporarily disable Cloudflare (or set the DNS cloud to 'grey') to see if the error persists. If it disappears, the issue is likely in the configuration between Cloudflare and your server.

  2. Restart the Web Server: This error is frequently caused by a failure in the web server application due to high resource usage. Contact your hosting provider to have the web server restarted.

  3. Check DNS Records: Ensure your DNS settings in Cloudflare (specifically the A record) point to the correct IP address of your hosting server.

  4. Audit Plugins (Cookie/Header Size): Some plugins store excessive data in cookies, making the HTTP headers too large. Try disabling plugins one by one to see if one of them is causing the "heavy" headers.

  5. Check Error Logs: Once Cloudflare is disabled, check your server's error logs for specific crash reports or PHP errors.


Can’t figure it out? You can always send a message to the support team via the chat bubble at the bottom right 🎈 Support to the rescue πŸ‘¨β€πŸ’» πŸ‘©β€πŸ’»

Did this answer your question?