# How To Fix the 504 Gateway Timeout Error

**URL:** <https://onehack.st/t/how-to-fix-the-504-gateway-timeout-error/175151>\
**Category:** Tutorials & Methods\
**Tags:** networking, tips-tricks, windows\
**Created:** [March 12, 2021, 5:47pm UTC](https://onehack.st/t/how-to-fix-the-504-gateway-timeout-error/175151 "2021-03-12T17:47:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![PlayBoy83](https://onehack.st/user_avatar/onehack.st/playboy83/32/164314_2.png) [@PlayBoy83](https://onehack.st/u/PlayBoy83)\
**Post date:** [March 12, 2021, 5:47pm UTC](https://onehack.st/t/how-to-fix-the-504-gateway-timeout-error/175151/1 "2021-03-12T17:47:37Z")

</div>

## What Does the 504 Gateway Timeout Error Mean?

There’s a lot that happens behind the scene when you visit a website or click a link on your browser. Typically, it follows the steps below:

1. Enter a URL in the browser’s address bar.
2. The browser validates and locates the website’s IP address (via DNS lookup).
3. The browser sends a request to the website’s servers.
4. The servers process the request and send a copy of the web page to the browser.
5. The browser assembles and interprets the information from the server and displays a webpage.

## How to Fix the 504 Gateway Timeout Error

We’ve compiled a handful of potential troubleshooting methods that’ll resolve the error if the problem is from your end. Put them to test and see if they work for you.

## 1. Refresh the Webpage

As earlier mentioned, a website may display the 504 error code if its servers are overloaded—perhaps due to a sudden spike in traffic. If this is the cause of the error, reloading the webpage may restore things back to normalcy. Click the circular arrow icon next to the address bar or press F5 to reload the page.

You can also reload a page on any browser using the **Control + R** shortcut (for Windows) or **Command + R** (for Mac).

## 2. Restart Your Router or Network Device

Before you reboot your network device, connect your computer to an alternate network if there’s any available. If you can access the webpage on a different network, your wireless router or internet modem is the problem.

Restart the network device, reconnect your computer to the network, and reload the webpage. If you’re still getting the 504 Gateway Timeout error, consider resetting the router or modem to factory default.

## 3. Check Your Proxy Settings

If you use a proxy on your computer, make sure the server settings are correct and properly configured. Go to **Settings** \> **Network & Internet** \> **Proxy** (for Windows) or **System Preferences** \> **Network** \> **Advanced** \> **Proxies** (for macOS) to check for any manual proxy setup.

 ![image](https://onehack.st/uploads/default/original/3X/a/8/a813278f1ef21314b606b066a3fa0a89175f1756.png)

Disable the proxy and refresh the affected website. If your browser loads the webpage, your proxy configuration is probably the problem.

## 4. Change DNS Servers

Most computers use the default Domain Name Servers (DNS) designated by the Internet Service Provider (ISP). These ISP-assigned servers are sometimes unreliable and cause issues like slow connectivity. If the affected webpage loads successfully on a different device, change your PC’s DNS provider to any free and reliable public server with fast response time. That can make a lot of difference.

#### **Change DNS on Windows**

To change your DNS provider on Windows, go to **Settings** \> **Network & Internet** \> **Status** and click **Change adapter options**.

 ![image](https://onehack.st/uploads/default/original/3X/1/8/1825e94a2fdd24b0aa874beada513d57c0a22847.png)

1. On the next window, double-click on the adapter responsible for your network connection: **Ethernet** or **Wi-Fi**.

 ![image](https://onehack.st/uploads/default/original/3X/6/8/68dd6e962eb9dd89d0d541eefefd99df4c68fa7d.png)

1. Click the **Properties** button.

 ![image](https://onehack.st/uploads/default/original/3X/d/3/d3f8992e67cac07766972c71b773a1d64dfd46e5.png)

1. In the “This connection uses the following items” section, double-click **Internet Protocol Version 4 (TCP/IPv4)**.

 ![image](https://onehack.st/uploads/default/original/3X/f/3/f315b3f22cbd1dd475066fb6256c182ddc3532a1.png)

1. Check the “ **Use the following DNS server addresses,** ” enter **8.8.8.8** in the Preferred DNS server box and **8.8.4.4** in the Alternate DNS server box. Click **OK** to proceed.

 ![image](https://onehack.st/uploads/default/original/3X/e/b/eb7d3e710e08572347f70f59158c1b70bd453dcb.png)

1. Finally, click **OK** on the Wi-Fi/Ethernet Properties window to save the changes.

 ![image](https://onehack.st/uploads/default/original/3X/d/b/dbb6e29d71659ca8cca0d040ffdcf491910b6e57.png)

#### **Change DNS on macOS**

For Mac users, navigate to **System Preferences** \> **Network** and click the **Advanced** button at the bottom-left corner.

 ![image](https://onehack.st/uploads/default/original/3X/5/3/53445b04a32c89628727fa761ea3d9a2652bc1f3.png)

Go to the **DNS** tab and click the **plus (+)** icon at the button-left corner to add a new DNS server.

 ![image](https://onehack.st/uploads/default/original/3X/d/1/d1cc7216e4b361b26d9eff9fa5a42075d15644e7.png)

Add these Google Public DNS: **8.8.8.8** and **8.8.4.4**. Click **OK** to proceed and click **Apply** on the next page to save the changes.

 ![image](https://onehack.st/uploads/default/original/3X/a/7/a79c04e3bf9eebf5658b26feed077be90880b961.png)

## 5. Clear the DNS Cache

When you visit a website, your computer stores information about the website’s domain name in a DNS cache. Next time you visit the website, data in the DNS cache swiftly points your browser in the right direction so that the website loads faster.

It’s possible to experience a timeout error if a 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 the DNS cache. That will prompt your device and browser to obtain updated DNS information next time you visit the website.

To clear the DNS cache on Mac, launch **Terminal** (go to **Applications** \> **Utilities** \> **Terminal** ), paste the command below in the console, and press **Return**.

**sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder**

Enter your Mac’s password when prompted and press **Return**.

 ![image](https://onehack.st/uploads/default/original/3X/d/4/d46bd159de895840e4dd1627a3a9461918c69d34.png)

For Windows devices, launch the Command prompt (press **Windows + X** and select **Command Prompt (Admin)**), paste the command below in the console, and press **Enter**.

**ipconfig /flushdns**

 ![image](https://onehack.st/uploads/default/original/3X/0/1/01a9a847028f07ee9149c817fc3d6955d6cfbd31.png)

## Enjoy an Error-Free Internet Experience

Hopefully, you now know what causes the 504 timeout error and how you can attempt to fix it as a website visitor. If the error continues after troubleshooting your computer and network settings, reach out to the website administrator; the problem is most definitely due to server-side malfunctions. If the error is popping up on every other website, you should contact your ISP to confirm if there’s a network outage. `(Source: helpdeskgeek)`

**Happy learning!**
