Celebrate Our 22nd Anniversary with Huge Savings! Up to 70% Off

How To Fix The 502 Gateway Error?

A gateway error occurs when you try to access a website that is either down or not properly configured. The 502 Gateway Error indicates that the web server you tried to reach is currently unable to handle the request due to maintenance downtime or capacity problems.

Generally, a 502 Bad Gateway Error means there is a problem with a website's communication with its server. This error doesn't tell you the problem since it's just a generic error. The 502 error means that the server encountered a temporary problem that prevented it from fulfilling the request. You may want to try again at a later time. Your site's visitors will receive an error page with this error, as shown in the photo below.

Here we have mentioned a few steps to fix the 502 Gateway Error.

  1. Check your DNS settings.

If you have been having issues connecting to websites, it could be due to bad settings on your DNS (Domain Name System). Your computer uses a series of numbers called IP addresses to connect to different websites, and these IP addresses are stored as records in your computer's DNS system. When you type in a website address in your browser's URL bar, your computer queries your DNS server for its corresponding IP address. If you don't have the correct DNS servers configured, you may not be able to reach the site.

  1. Clear your temporary internet files

When you visit a web page, your browser stores a copy of the page in memory and then sends that information to your ISP over the Internet. Since this happens in real-time, any changes you make to the webpage while viewing it won't be saved until you close out of the browser window.

The easiest way to clear out old cached pages is to open up your Internet Explorer or Google Chrome browser and hit Ctrl+Shift+Delete to open up the Temporary Internet Files, caches, and Cookies folder. Once you've located them, delete each file, cookie, and cache and empty the trash bin.

  1. Restart your modem

A lot of times, the issue is simply that your router isn't getting a good signal from your modem. Even if you have a static IP address assigned to your device, it still needs to get connected to the Internet to receive updates. So, restarting your modem might do the trick.

  1. Restart Your Computer

Restarting your computer should fix issues if you have been using your computer for a while and have not changed anything recently. 

  1. Switch browsers

Google Chrome users should try switching browsers. Mozilla Firefox is generally recommended since it supports some privacy features, although Apple Safari supports similar tools.

  1. Refresh the page.

Press CTRL + F5 OR CTRL+SHIFT+R

CTRL + F5 will soft refresh the browser page and load the page again.

A soft refresh is simply refreshing a webpage without changing anything on the server. In other words, it's just reloading the same HTML file. This happens when you go to a website and hit "refresh" in your browser. The page may load faster, but it won't change. If you're using something like WordPress, the site might update automatically if the data changes on the backend, but it would still show the same thing. 

You can also hard refresh the page by pressing CTRL+SHIFT+R.

  1. Get in touch with the hosting company's technical support team.

An issue with the web host is the most common cause of a 502 bad gateway error. When a query, script, or request takes too long, the server cancels or kills it. The "kill script" is something that most hosting companies implement so they don't take down a site or impact other users if a request takes a too long time. We request you contact the web hosting support team and check the issue with them.

Conclusion:

There are numerous ways of investigating and fixing a 502 gateway error. As a rule, this isn't an issue with the client but with the host. Sometimes plugins or themes with unoptimized queries or bad code should cause the issue. 

We hope the mentioned troubleshooting steps have helped you to fix your website's errors.

That's it.


Was this answer helpful?

« Back

chat