The internet is full of possibilities and potential problems. Like you might run into a good friend at the grocery store or get a flat tire on the way to work, sometimes your computer works flawlessly, and other times has an error trying to load a webpage. The 504 Gateway Timeout error is one of those and requires a quick fix. It is an HTTP status code that means one server didn’t receive a timely response from another. Effectively, 504 errors tend to occur when the browser tries to access a page or fill a request, but there’s lag time communicating with the other server.
That commonly indicates that the computer you’re trying to access the website doesn’t control it. Instead, it relies on communication with another computer that isn’t happening quickly enough. Luckily, it’s usually easy to fix.
An Overview of 504 HTTP Status Code
504 Gateway Timeout status code means that the server was acting as a gateway or proxy and did not receive a timely response from the upstream server. This type of error often indicates a network or an issue with the website’s servers. A server issues status codes in response to a client’s request made to the server. They indicate whether a specific HTTP request has been completed. For example, the status code’s 5xx (Server Error) class indicates that the server is aware that it has encountered an error or is otherwise incapable of performing the request.
Except for this condition, 200 series of Status Codes represent successfully handling the request. If you get this error frequently, there is a problem with your internet connection or the website. You might see a 504 error in these forms:
- 504 Gateway Timeout
- Error: Server did not respond in time
- The server took too long to respond
What Causes 504 Gateway Timeout Error?
504 error can appear for a variety of reasons, such as:
- Poor Internet connection — A slow internet connection or low bandwidth limit is the most common reason behind this error. For example, if you are trying to load a webpage that takes too long, you might see it.
- Website’s server is offline — Another possibility is that the website’s server that you are trying to access is down or not responding for some reason. This can happen for various reasons, such as maintenance or server issues.
- DNS issues — If the website you are trying to access has changed its IP address recently, your computer’s DNS cache might be outdated.
- Proxy server is down — If you are using a proxy server to connect to the internet, the server may be offline or working incorrectly.
- Incorrect proxy settings — It is also possible that your proxy settings are incorrect or misconfigured.
The best way to fix the 504 HTTP error is to tune your network settings and optimize your internet connection. Here are a few more tips to help you do that:
1. Try Reloading the Webpage
If you encounter a 504 Gateway Timeout error, one of the first things to try is reloading the page after waiting a few minutes. In most browsers, you can press F5 to refresh/reload the webpage. However, to remove cached data before reloading some browsers, use CTRL+F5 instead. You could also try loading the site in a different browser to check whether that’s the cause. Because overloaded servers cause most 504 difficulties, this approach should cure your site’s outage. However, if waiting and reloading the website does not solve the problem, see whether a website is down for everyone or only you.
2. Reboot Network Devices
If reloading the webpage does not fix the Gateway Timeout error, try restarting your modem and router. These devices often cache DNS data and may cause 502 Bad Gateway issues until they are power-cycled. To reboot your modem and router:
- Unplug the power cable from both devices. Wait a few minutes before plugging them back in to give the device time to boot up properly.
- Check if you can load the website now.
- If this still doesn’t work, move on to the next step.
3. Clear Your Browser’s Cache and Cookies
Deleting your browser’s cache and cookies is another way to fix the 504 Gateway Timeout error by forcing your browser to download a fresh copy of the website’s files from the server. How to do this varies, but here are the instructions for some popular browsers:
- Chrome: Press CTRL + SHIFT + DEL to open the “Clear browsing data” window. Select “All time” from the “Time range” drop-down menu, check all the boxes, and click Clear data.
- Firefox: Press CTRL + SHIFT + DEL to open the “Clear Recent History” window. Select “Everything” from the “Time range” drop-down menu and check all the boxes. Click Clear Now.
- Safari: Press SHIFT + OPTION (ALT) + CMD + E to empty the cache. You can also go to Preferences > Advanced > Website Data > Remove All Website Data.
- Microsoft Edge: Identical to Chrome.
4. Check Your Computer’s DNS Settings
Another way to fix the 504 Gateway Timeout error is by checking your computer’s DNS settings. If you are using a custom DNS server, it might be offline or not working correctly. In this case, you can try switching to a public DNS server like Google Public DNS or OpenDNS.
Looking at Windows DNS Settings
Go to Control Panel, then:
- Open Network and Internet > Network Connections.
- Right-click your active connection and select Properties.
- Select “Internet Protocol Version 4 (TCP/IPv4)” and click Properties.
- If the box next to “Use the following DNS server addresses” is checked, uncheck it and enter “8.8.8.8” in the Preferred DNS server field and “8.8.4.4” in the Alternate DNS server field.
- Click the OK button to save your changes and close all open windows.
Checking Settings for DNS on Mac
Go to System Preferences and then:
- Select Network from the Apple Menu bar.
- Select your active connection and click Advanced at the bottom of the window.
- Go to the DNS tab and click + to add a new DNS server address. For example, enter 8 .8.8.8 in the DNS field and click + again to add 8.8.4.4.
- Click OK to save your changes and exit all windows.
5. See if There are Network Outages
Another reason you might be seeing a 504 Gateway Timeout error is if there is a network outage in your area that’s preventing you from accessing the website. To check for outages, visit DownDetector and enter the name of the website or service you’re trying to access into the search bar at the top of the page. This will show you any reported outages for that site, as well as live status updates and estimated times when the issue will be fixed.
6. Check Device’s Proxy Settings
If you are using a proxy server, there’s a chance it might be causing 504 Gateway Timeout errors. To check if this is the case, temporarily disable your proxy settings and try to load the webpage again. Here are instructions for some commonly used browsers:
- Chrome: Enter
chrome://settings/
into the address bar and then scroll down to Advanced > System > Open proxy settings. In the window that appears, turn off any proxy settings that are turned on. - Firefox: Enter
about preferences#general
into the address bar and then scroll down to “Network Proxy”. In the “Connection Settings” section, turn off any enabled proxy settings. - Safari: Enter Safari > Preferences from the Safari menu bar and click Advanced. In the “Proxies” section, turn off any proxy settings that are turned on.
- Microsoft Edge: Enter
about flags
into the address bar and then press Enter. Scroll down to the “Proxy server” section and turn off Use a proxy server.
7. Disable Your Site’s CDN Temporarily
IAre you using a content delivery network (CDN)? If so, there’s a chance that a CDN-related problem is causing the 504 Gateway Timeout error, hence disabling it temporarily can be a fix. Follow the instructions for some popular CDNs:
- CloudFlare: Enter
https://www.cloudflare.com/a/caching
into your browser’s address bar and click the Disable button next to “Performance Mode”. - Incapsula: Type
https://my.incapsula.com/api/integration/v1/zones
into your browser’s address bar and then find your website’s domain name. Click the Disable button close to the domain name. - KeyCDN: Enter
https://www.keycdn.com/zones
into your browser’s address bar and then find your website’s domain name. Click the Off button next to the domain name.
8. Contact the Website Directly
If you’ve tried all the other solutions on this page and the 504 Gateway Timeout error still shows up, it’s best to contact the website or service directly and tell them there is an issue. To check if you’re the only one suffering, visit the DownforEveryoneorJustMe.com website. You can also find the website owners on social media sites like Twitter, Instagram, or Facebook.
If you can’t find contact information for the website, there’s a good chance the issue lies with your ISP (Internet Service Provider) or network administrator and not the website. In that case, you should contact your ISP or network administrator and ask them to check their server logs to see what the source of the 504 Gateway Timeout error is.