How to Fix 504 Gateway Timeout error?.
When you have problems accessing certain websites, your browser will often display an HTTP status code that helps you decipher the problem. These codes come in different types and variations, each with its own individual meaning and solution. There is a 90% chance that you have encountered a 504 Gateway Timeout error at least once while browsing the Internet.
What does 504 Gateway Timeout mean? The 504 Gateway Timeout error is labeled differently on different websites and across browsers, but the options mean the same thing. So, if a certain website displays a “Gateway Timeout (504)” error while others display theirs as “HTTP Error 504”, “Domain Responding Too Long” or “Gateway Timeout”, they indicate on the same problem.
In this guide, we are going to tell you everything you need to know about gateway timeout error 504: its meaning, causes, and solutions.
What Does the 504 Gateway Timeout Error Mean?
When you visit a website or click on a link in your browser, a lot happens behind the scenes. This is usually done as follows:
- Enter the URL in the address bar of your browser.
- The browser checks and locates the IP address of the website (via DNS lookup).
- The browser sends a request to the servers of the website.
- The servers process the request and send a copy of the web page to the browser.
- The browser builds and interprets the information from the server and displays the web page.
If your browser displays a 504 Gateway Timeout error instead of a functional web page, it means there was a problem in step 4. That is, the servers of the website were not able to process your browser request quickly enough.
This happens when the website gateway server (or primary server) does not receive a timely response from the secondary server (also called the upstream server). So what exactly is causing this delay in connecting to the server? To find out, skip to the next section.
What Causes the 504 Gateway Timeout Error?
Often the 504 Gateway Timeout error occurs due to problems connecting to the server on the website side; perhaps one (or all) of the servers are down or temporarily overloaded and unable to process new requests. This error can also occur if the website has recently moved to a new IP address (hosting service) or its firewall configuration is mistakenly blocking secure content.
504 Gateway Timeout errors usually occur due to server-side glitches, so the website admin can best address the issue. However, you should also troubleshoot your device. This is because a 504 timeout error can also occur due to problems with your device or network settings, although this is a rather rare possibility.
How to Fix the 504 Gateway Timeout Error
We’ve put together a few possible troubleshooting methods to help resolve the error if the problem is coming from you. Give them a try and see if they work for you.
1. Refresh the Webpage
As mentioned earlier, a website can display a 504 error code if its servers are overloaded – possibly due to a sudden spike in traffic. If this is the cause of the error, reloading the web page may return everything to normal. Click the round arrow icon next to the address bar or press F5 to reload the page.
You can also reload the page in any browser using the keyboard shortcut Control + R (for Windows) or Command + R (for Mac).
2. Restart Your Router or Network Device
Before rebooting the network device, connect the computer to an alternate network, if available. If you can access the web page on a different network, the problem is with your wireless router or internet modem.
Reboot your network device, reconnect your computer to the network, and reload the web page. If you still get the 504 Gateway Timeout error, try resetting your router or modem to factory defaults.
3. Check Your Proxy Settings
If you are using a proxy on your computer, make sure the server settings are correct and configured correctly. Go to Settings> Network & Internet> Proxy (for Windows) or System Preferences> Network> Advanced> Proxies (for macOS) to check the proxy setting manually.
Disable the proxy and update the affected website. If your browser is loading a web page, the problem is probably with your proxy configuration.
4. Change DNS Servers
Most computers use the default Domain Name System (DNS) servers assigned by your Internet Service Provider (ISP). These servers, assigned by the ISP, are sometimes unreliable and cause problems such as slow connections. If the vulnerable web page loads successfully on another device, change your PC’s DNS provider to any free and reliable public server with fast response times. This can make a big difference.
Change DNS in Windows
To change the DNS provider in Windows, go to Settings> Network & Internet> Status and click Change adapter settings.
2. In the next window, double-click the adapter responsible for your network connection: Ethernet or Wi-Fi.
3. Click the “Properties” button.
4. Under “This connection uses the following items”, double-click Internet Protocol Version 4 (TCP / IPv4).
5. Select the Use the following DNS server addresses check box, enter 188.8.131.52 in the Preferred DNS server field and 184.108.40.206 in the Alternate DNS server field. Click “OK” to continue.
6. Finally, click OK on the Wi-Fi / Ethernet Properties window to save the changes.
Change DNS on macOS
Mac users: Go to System Preferences> Network and click the Advanced button in the lower-left corner.
Go to the DNS tab and click the plus sign (+) in the left corner of the button to add a new DNS server.
Add these Google Public DNS: 220.127.116.11 and 18.104.22.168. Click “OK” to continue and “Apply” on the next page to save your changes.
5. Clear the DNS Cache
When you visit a website, your computer stores the website’s domain name information in the DNS cache. The next time you visit the website, the data in the DNS cache will quickly point your browser in the right direction for the website to load faster.
A timeout error may occur if the website changes its IP address or server. This is because the DNS cache will direct your browser to the old (or outdated) IP address. You can fix this problem by clearing your DNS cache. This will force your device and browser to get updated DNS information the next time you visit the website.
To clear the DNS cache on a Mac, launch Terminal (choose Applications> Utilities> Terminal), paste the command below into the console, and press Return.
sudo dskacheutil -flyushkahe; sudo killall -UP mDNSResponder
Enter your Mac password when prompted and press Return.
For Windows devices, launch Command Prompt (press Windows + X and select Command Prompt (Admin)), paste the command below into the console, and press Enter.
ipconfig / flushdns
Enjoy an Error-Free Internet Experience
Hopefully, you now know what is causing the 504 timeout error and how you can try to fix it as a website visitor. If the error persists after troubleshooting your computer and network settings, contact your website administrator; the problem is most likely due to server-side glitches. If the error appears on all other websites, you should contact your ISP to see if there is a network outage.
How to Fix 504 Gateway Timeout error?
How to Fix 504 Gateway Timeout error?