The 502 Bad Gateway problem is frequently caused by a tremendous load on the web page you’re trying to visit, resulting in the error.
Option 1: Refresh
The simplest thing you can do is try reloading the page. Reload the page after a few minutes if it does not appear right away. Meanwhile, try a different browser to determine if the problem is browser-specific.
Option 2: Clear your Cache
- Fire up Google Chrome.
- Select Settings from the three-dot menu icon.
- Scroll down to the Privacy and Security section on the Settings page.
- Select Clear Browsing Data from the drop-down menu.
- Select a time range from the Advanced tab. Next, make a list of all the data you want to delete.
- Wait for the browsing data to be deleted after clicking the Clear Data button.
- Close and reopen the browser to see if anything has changed.
It is a good idea to clean your browser cache whenever you experience frequent server and web page problems like faulty gateway 502. By clearing the browser cache, the browser will be forced to load new data.
Option 3: DNS
Clear the DNS cache on your local computer
- To open the search bar, press the Windows key.
- Run as Administrator by typing cmd, right-clicking on Command Prompt, and selecting Run as Administrator.
- Type the following command in the Command Prompt and press Enter to run it:
ipconfig /flushdns
- When it’s finished, you should see the message Successfully flushed the DNS resolver cache.
If the problem persists, try changing your PC’s default DNS server address to see if that fixes the problem.
Modify the DNS server address of your PC
- Hold down the Windows key and the R key at the same time.
- To open Control Panel, type control and click OK.
- Select Network and Sharing Center from the Network menu.
- Change adapter settings can be found in the left pane.
- Select Properties from the context menu when you right-click on your network adapter.
- Locate and double-click Internet Protocol Version 4 (TCP/IPv4) in the Properties window.
- Select the option to use the DNS server addresses listed below.
- In the Preferred and Alternate DNS server address fields, type the following.
- 8.8.8.8
8.8.4.4
- 8.8.8.8
- To save the changes, click OK.
Relaunch Chrome and try viewing the site again now that you’ve updated the default DNS server address.
If you just moved your WordPress site to a new host, it may take some time for the changes to be propagated by the server. While the process typically takes only a few minutes, it can take up to 24 hours at times.
Source: itechbrand.com