One place for hosting & domains

      DNS Server Not Responding Error? Here’s How To Fix It (13 Ways)

      Unlike many problems that affect websites, the DNS Server Not Responding error seems pretty descriptive. Clearly, some distant server isn’t playing ball and it’s blocking you from visiting a particular website.

      But what exactly is a DNS server and why is it misbehaving? In a strange way, the information provided by the error message is only useful if you already know what it means.

      To help you resolve this issue, we decided to take a deeper look at the DNS Server Not Responding error, and all the possible causes. Keep reading to find the answers you’re looking for!

      What Does The “DNS Server Not Responding” Error Mean?

      To understand this error, we first need to take a quick look at DNS, or domain name system.

      DreamHost Glossary

      DNS

      The Domain Name System (DNS) protocol keeps records of which domain names correspond to specific IP addresses. DNS enables you to browse the web by typing in regular URLs instead of IP addresses.

      Read More

      Whenever you ask your browser to connect to a website, a DNS server has to convert the domain name (e.g., mysite.com) to the numeric IP address (four numbers separated by three periods, for example, 127.0.0.1) of the hosting server. This is where the site actually lives; the domain name is simply a pretty title that is easier for humans to remember.

      DNS Server Not Responding error occurs when, for some reason, your browser can’t make contact with the server that handles the domain name to IP address translation.

      There are three underlying reasons why this could be happening:

      • The DNS server is down or unreachable: There is something wrong with the server itself, or its network connection.
      • You have connectivity issues: Often due to an outage somewhere between you and the server, including network issues.
      • The DNS record for the domain name is incorrect or missing: This means the DNS server doesn’t know which IP address to point the domain name to.

      3 possible issues with DNS server not responding error: DNS server is down, connectivity issues, DNA record error or missing

      In order to fix the error, we need to work through a checklist that covers all three possible causes.

      Fixing The DNS Server Not Responding Error

      If the DNS Server Not Responding error appears only on your site, it might be because your domain name isn’t configured correctly.

      • Make sure your domain name hasn’t expired.
      • Check that you have an “A record” and it contains no typos.
      • If you made changes recently, give them time to propagate.

      If none of this helps, or you see the error on other websites, here are all the ways you can fix a DNS Server Not Responding error:

      1. Try Using A Different Browser

      Strictly speaking, switching to another browser won’t fix DNS issues. But it can reveal what has gone wrong.

      Every browser maintains a cache, where content is stored temporarily for quick access. The problem is that your browser cache might have stored the wrong DNS records. If this happens, you will get the same error message whenever you try to revisit the same page.

      DreamHost Glossary

      Cache

      A cache is a temporary data storage layer that is designed to improve data access speeds by reducing the time needed to read and write data from a permanent data storage location.

      Read More

      By moving away from your default browser, you will be using a different cache, and each browser has its own default DNS servers. In addition, you will bypass other issues like extensions that block connections.

      2. Check The Site From A Different Device

      If you’re still seeing an error on a particular website after changing your browser, try swapping to a different device. This will ensure that some other unexpected issue in your local system isn’t causing the problem.

      If you don’t have access to another desktop computer, simply pull out your phone and try to visit the page in question. If this doesn’t fix the error, it’s also worth connecting to a different network or switching to data.

      3. Restart Your Computer

      Another way to deal with cache-related problems is by restarting your device. This will flush all DNS records from your machine, so your device will have to perform a live DNS lookup when you visit the problematic page.

      Restarting your device also renews its IP address and clears the DNS request queue, which can be enough to fix certain connectivity issues. It could be enough to clear the error.

      Get Content Delivered Straight to Your Inbox

      Subscribe to our blog and receive great content just like this delivered straight to your inbox.

      4. Restart Your Computer In Safe Mode

      Sometimes, software and related drivers on your device are the cause for the blocked DNS connections. To test for this issue, it’s a good idea to boot up your device in Safe Mode:

      Windows:

      1. On the sign-in screen, click Restart while holding Shift.
      2. Select Troubleshoot > Advanced options > Startup Settings > Restart.
      3. After restart, press 5 or F5 to start up your device in safe mode with networking.

      screenshot of the startup settings in windows highlighting the restart button in the lower right-hand corner

      Mac: Hold Shift as you power up.

      screenshot of a mac starting up in safe mode

      iOS / Android: Press and hold the power button, and then tap the down volume control after the screen lights up.

      screenshot of a ios mobile phone power selector settings highlighting the safe mode option

      In this mode, your machine will revert to default settings and only the most essential drivers. If the problem sites load normally while in Safe Mode, it means that either third-party software or drivers are causing incompatibility issues.

      This is definitely bad news, because the only way to track down the precise cause is by testing your apps, one by one. That said, it’s most likely to be something like a VPN, or security software causing your headaches.

      5. Turn Off Antivirus Software And/Or Your Firewall

      Antivirus applications and firewalls protect your device by monitoring traffic. From time to time, these tools sometimes meddle too much with your internet connection and end up causing DNS server errors.

      As such, it’s a good idea to switch off your antivirus program and/or firewall protection temporarily, to test whether they are causing the problems.

      If this resolves the problem, make sure to turn your protection back on. Then, look through the settings to find anything related to DNS that may be causing your troubles. If your chosen software package includes support, it may be worth reaching out to your provider for help.

      6. Turn Off Your VPN

      VPNs, or virtual private networks, provide an extra layer of online privacy by routing data to your device through an encrypted tunnel. So far, so useful. The issue is, the tunnel might be bypassing your default DNS servers.

      To test this idea, switch off your VPN and try to visit the page where you had the DNS server issue. If this resolves your problems, restart the VPN and take a peek at the settings. You’re looking for controls related to DNS filtering. If you need a helping hand, try contacting your VPN provider for support.

      7. Flush DNS Cache

      You don’t necessarily need to restart your device to flush the DNS cache. You can do it manually instead:

      1. Press Win + R and type in the “ipconfig /flushdns”.
      2. Then, hit Ctrl + Shift + Enter to run the command prompt.
      1. Open the Terminal, and type in “sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder”.
      2. Press Enter.
      3. Input your admin password when prompted, and press the Enter button again.
      • iOS: Turn Airplane Mode on and back off again.
      • Android
      1. In Chrome, type “chrome://net-internals/#dns” into the search box.
      2. Select DNS on the left, and then tap Clear host cache

      By flushing your DNS cache, you will force your device to re-query the DNS server for each site you visit. This ensures you have updated mappings of domain names to IP addresses — an essential first step in network diagnostics.

      8. Restart Your Router

      Network connection issues are a common cause of DNS server errors. One easy way to fix this kind of problem is by restarting your internet router.

      Switch it off and unplug the power cable for around 30 seconds. This should clear any corrupted DNS entries that have been stored in the router cache, and renew your connection.

      At the same time, it’s worth checking that your router’s firmware is up to date. Outdated firmware can cause connectivity issues that prevent DNS lookups. In combination, these steps might fix your problem.

      9. Disable IPv6

      Internet protocol is the system that creates a unique IP address for every device on the internet. The current version is IPv6 (Internet Protocol Version 6), which has gradually replaced IPv4 over the past few years. It is now the default option.

      However, not every network and DNS server has been updated to IPv6.

      If you use this version to request a particular web page, you might only receive a DNS Server Not Responding error. Similarly, systems that are in hybrid mode can experience technical troubles in juggling both systems.

      For this reason, it’s worth temporarily switching off IPv6 to see whether you can access a website via IPv4.

      The exact process depends on your platform, but it usually involves:

      1. Visiting the network settings on your device.
      2. Selecting your active connection (usually Ethernet or Wi-Fi).
      3. Accessing the advanced options via Advanced, Properties, or i.
      4. Toggling IPv6 off, and saving your changes.

      screenshot of windows DNS settings options to toggle IPv4 and IPv6 on and off

      Lastly, you will need to restart your device to test whether this potential solution has worked. If you see no improvement, reverse the process to switch IPv6 back on — this can help you to maintain better performance as you move between different networks.

      10. Change The Default DNS Server

      Normally speaking, your device connects to a DNS server provided by your ISP (Internet Service Provider). If you’re having DNS issues, it might be because this server is misbehaving. The solution here is to switch to a different server.

      Organizations like Google and Cloudflare provide public DNS servers that anyone can use. Some people prefer using these servers because they can speed up page loading. In other cases, people use an alternative DNS server for privacy reasons.

      Some of the most popular alternate DNS providers include:

      • Google: 8.8.8.8 and 8.8.4.4
      • Cloudflare: 1.1.1.1 and 1.0.0.1
      • OpenDNS: 208.67.222.222 and 208.67.220.220

      Here’s how to switch your DNS server address.

      Windows:

      1. Navigate to Control Panel > Network Connections > Properties. 
      2. Under Preferred DNS server, enter the IP address of your preferred DNS server.
      3. Under Alternate DNS Server, put in the address of your backup server, and save your changes.

      screenshot of windows IPv6 properties calling attention to the use the following DNS server addresses text boxes

      Mac:

      1. Navigate to System Preferences > Network and select your primary internet connection in the sidebar.
      2. Click Details (or Advanced on older Macs) then select DNS.
      3. At the bottom of the DNS servers list, click the + button and enter your new DNS address.
      4. Make sure to click Apply before leaving the Network screen.

      screenshot of windows IPv6 properties calling attention to the use the following DNS server addresses text boxes

      iOS Mobile

      1. Navigate to Wi-Fi settings (they might be under Network & Internet)
      2. Find the DNS settings…
      3. On iOS, tap the i icon, then Configure DNS.
      4. Select Manual < Add server to update DNS.

      screenshot of an ios mobile phone configure DNS settings screen

      Android Mobile

      1. On Android, open Settings > Connections > More connection settings.
      2. Tap on “Private DNS” and choose “Private DNS provider hostname to change the DNS server.

      screenshot of an android private DNS setting screen

      Once you have finished changing your DNS server settings, restart your device before trying to access the internet. This will ensure that the new DNS settings are adopted, giving you a chance of beating those pesky errors!

      11. Update Network Adapter Drivers

      A network adapter driver is a piece of software that allows an operating system to communicate with a network adapter. This is the small card in your device that handles internet connections.

      If the driver software isn’t regularly updated, it can start to create problems. Likewise, a driver that is corrupted, or incompatible with a new network adapter, is likely to create headaches.

      One possible symptom is — you guessed it — the kind of DNS error we’re trying to fix.

      Many devices update their network drivers automatically; macOS handles this chore behind the scenes. On Windows, you can take control of the adapter settings yourself:

      1. Visit Device Manager.
      2. Right-click Network Adapter.
      3. Select Update Drivers from the drop-down menu.

      If possible, it’s a good idea to connect to the internet via an Ethernet cable when updating your drivers. The reason is simple: you’re updating the piece of hardware you need in order to download the update. Interruptions due to poor Wi-Fi signal can mess up the process.

      Once you have updated your drivers successfully, restart your device and see if DNS is working properly.

      12. Disable Secondary Connections

      Some devices have more than one network adapter. For example, wired and wireless connections use different adapters.

      In most cases, you only need to use one adapter at a time. Switching off all secondary connections is a good idea because they can cause problems with DNS requests.

      To do this, visit the network settings on your device and turn off all live connections other than the one you’re using (e.g., If you’re connected via Wi-Fi, disable the Ethernet connection.)

      It’s also worth checking whether you have a virtual network adapter running. This is a digital service that allows multiple connections via the same physical adapter. It’s a feature used by VPNs, allowing you to tunnel some traffic through the private network, and some through a regular internet connection.

      To make sure a misbehaving virtual network adapter isn’t causing your problems:

      1. Open Control Panel > Network Connections.
      2. Right-click on the virtual adapter you want to switch off, and select Disable.
      3. Confirm you want to disable the adapter. This will take it offline.
      1. Open System Preferences > Network.
      2. Select the virtual adapter in the left sidebar, and click the gear icon.
      3. Select Make Service Inactive to disable the adapter.
      1. Find the VPN settings on your device.
      2. Tap the i or gear icon.
      3. Switch off the adapter.

      Once again, try to reload the malfunctioning page to see if the DNS error message has cleared.

      13. Disable Peer-To-Peer Feature (Windows)

      No luck? Don’t worry, there is one more potential fix you can try.

      Windows has a peer-to-peer feature, which helps to reduce the amount of bandwidth needed while downloading updates. Rather than forcing your device to swallow all the data in one big lump, this option splits updates into individual pieces. The PC that receives these pieces can then share them with others on the same network.

      This is obviously a useful feature. But as you might have guessed already, Windows P2P can interfere with the DNS lookup process. Switching it off can help you to diagnose errors:

      1. Navigate to Settings > Windows Update.
      2. Next, click on Advanced Options > Delivery Optimization.
      3. Toggle the switch labeled Allow downloads from other PCs.

      screenshot of the windows delivery optimization settings screen found under windows update where you can toggle allow downloads from other PCs on and off

      You will then need to restart your computer to test, once again, whether the DNS error has cleared. Fingers crossed!

      Frequently Asked Questions

      Still have questions? You’ve come to the right place. Here’s a little extra detail on fixing your DNS settings, and a closer look at why failures happen:

      How Do You Reset Your DNS Server?

      After following the various troubleshooting steps above, you may decide that you want to go back to the domain name servers you originally had.

      To achieve this, simply retrace the exact steps mentioned in #10 — but this time, select your current DNS servers and press the little minus button to remove them. After a restart, your device should then revert to the default ISP DNS servers.

      What Causes A DNS Failure?

      In simple terms, a DNS failure happens when your browser cannot convert a domain name to an IP address. However, there can be many different underlying causes.

      The DNS process offers access to over 1 billion internet hosts. That’s one mighty “phone book.” So, it’s almost inevitable that the system will have some flaws.

      Most DNS problems that people encounter are caused by issues with internet access or software on their device. Actual failures are most commonly caused by server outages or incorrectly configured domain names.

      Set Up Your Site Correctly With DreamHost

      If you want to avoid seeing DNS errors pop up on your website, you might want to switch to DreamHost.

      Our hosting panel makes it really easy to configure your site correctly and manage all your domain names on a single page. If you ever get stuck, our Technical Support team is available 24/7 to provide help — and that’s on every single plan.

      Sounds good? Sign up today to give it a try for yourself!

      Get Content Delivered Straight to Your Inbox

      Subscribe to our blog and receive great content just like this delivered straight to your inbox.

      How to Fix: 400 Bad Request Error


      As you’re browsing the web, you may stumble across an invalid page. Sometimes, a site’s server won’t be able to understand your request for its content. Instead of the requested resources, you’ll see a “400 Bad Request” error message.

      Fortunately, the 400 Bad Request issue is easy to resolve. Often, fixing typos in the URL will do the trick, but you may also need to clear your browser cache or temporarily disable extensions.

      In this post, we’ll explain what the 400 Bad Request error is and what causes it. Then, we’ll look at six different ways to fix it. Let’s get started!

      An Introduction to the 400 Bad Request Error

      When you try to access a web page, your browser requests the site’s data from its server. The web server will then process the request. Within the HTTP header, there will be a status code explaining whether the request was successful or not.

      In a successful HTTP request, you won’t see the status code. However, sometimes your web browser may display an error message like “400 Bad Request”:

      400 Bad Request error

      This 400-level HTTP status code indicates that there was a client-side error in the request. As a result, you won’t be able to view the page you requested.

      While this error typically shows up as “400 Bad Request”, you may see some variations:

      • Bad Request – Invalid URL
      • HTTP Error 400
      • HTTP Error 400 – Bad Request
      • HTTP Status 400 – Bad Request
      • 400 – Bad Request. The request could not be understood by the server due to malformed syntax. The client should not repeat the request without modifications.
      • Bad Request. Your browser sent a request that this server could not understand.
      • 400 Bad Request. Request Header Or Cookie Too Large
      • Bad Request – Error 400

      The 400 Bad Request error can be very frustrating, as it blocks access to the site without giving you any helpful information. Let’s discuss some of the most common causes.

      Potential Causes for the 400 Bad Request Error

      When a server returns a 400 Bad Request, it means that it cannot understand and process your request. Usually, this is due to a client-side error, which means there’s a problem on your end.

      Here are some common issues that may cause a 400 Bad Request error:

      • Invalid URL syntax: You may have mistyped the URL or used invalid characters.
      • Corrupted browser cache or cookies: If your browser cookies have expired or your cache is corrupted, the server may not be able to process your request properly.
      • Conflicting browser extensions: In some cases, your browser extensions can interfere with the request and cause a 400 Bad Request.
      • Bad DNS cache: Your locally cached DNS data could be out of sync with the current DNS registration for the domain.
      • Large uploaded file size: If you’re uploading a large file to a site, it could exceed the maximum upload limit.

      Alternatively, a 400 HTTP error could appear due to a server-side error. For example, the website may have a misconfigured server or a temporary glitch.

      How to Fix the 400 Bad Request Error (6 Methods)

      When you see a 400 Bad Request error, you can try refreshing the page. In some cases, this will resolve any temporary glitches. If it doesn’t work, you can try the following steps.

      1. Check for Errors in the Address

      First, you’ll want to check your URL for any errors. This is one of the most common causes of a 400 Bad Request.

      There could be typos, malformed syntax, or extra characters in the address. It’s important to go back to the domain name, directory path, and query string to make sure the address is correct.

      During this process, check for special symbols. For example, random characters like hyphens (-) or percentages (%) could cause the Bad Request:

      Invalid URL

      Some URLs have special characters, but you’ll need to make sure they’ve been coded correctly. You can check the address using a URL Decoder/Encoder. This tool will identify any invalid characters in the URL:

      URL decoder

      Then, try searching for the URL again. If the same 400 error pops up, you can also try searching for the web page in a different way.

      For example, you can run a search for the site’s domain name and a relevant keyword. If you were looking for our post on featured image sizes, you would type ‘site: dreamhost.com featured image sizes’ into a search engine:

      Search for page keyword

      This will enable you to access the page without having to type the URL manually. However, you may still get a 400 Bad Request error. If this happens, continue to the following method.

      2. Clear Your Browser’s Cache and Cookies

      Your browser saves site data in a cache. This way, when you revisit that site in the future, the browser will serve the cached content to make the page load faster.

      As you’re browsing the Internet, cookies will also be stored in your browser. These are small files that contain data such as the length of your browsing session. Cookies can also remember personalized information like your login details or site preferences.

      Although your browser’s cache and cookies can be helpful tools, they can also become corrupted. Additionally, cookies can eventually expire. When this happens, it can trigger a 400 Bad Request.

      To solve this problem, consider clearing the cache and cookies in your browser. In Google Chrome, you’ll need to hit the three-dot icon in the upper right-hand corner. Then, select More Tools > Clear Browsing Data:

      Clear Chrome browsing data

      This will open a pop-up window where you can choose the data you want to clear. Make sure to select Cookies and other site data as well as Cached images and files:

      Clear cookies and cache

      If the Bad Request error happens on a different device or browser type, this process will look a little different. If you use an iPhone or Microsoft computer, you’ll have to review the company’s knowledge base for clearing your specific cache, cookies, or browsing data.

      Keep in mind that this will sign you out of many websites. You may also experience slower loading times when you visit these sites again. However, it could remove corrupted or expired data that may cause a 400 Bad Request.

      3. Disable Browser Extensions

      If you’re a website owner, you likely know that third-party plugins can cause many WordPress errors. Similarly, the software in your browser extensions could interfere with your request.

      To get started, try disabling your extensions. If you’re using Google Chrome, click on the three dots again and navigate to More Tools > Extensions:

      Disable Chrome extensions

      This will take you to a page where you can manage your Chrome extensions. Using the toggle switches, turn all of them off:

      Chrome extensions

      Now, reload the page that triggered a Bad Request. If it loads successfully, then one of these extensions caused the error.

      To find the problematic extension, reactivate them one by one, each time checking to see if the error has returned. Once it does, remove the extension that caused it. This should prevent any 400 HTTP status codes in the future.

      4. Flush the DNS Cache

      The first time you visit a website, some of its data is stored locally in a cache. To load pages faster, your computer will save DNS information about websites. This will eliminate the need to search for the site’s nameserver and IP address every time you come back.

      Just like your browser cache, the DNS cache can also become corrupt or outdated. Sometimes, a website will update its DNS information. If this conflicts with your cached data, it can lead to a 400 Bad Request error.

      To fix this error, you’ll need to flush your DNS cache. For macOS operating systems running on Monterey and Big Sur, open the Terminal and enter this command:

      sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

      If you have Windows 10, open the Command Prompt and type in the following command:

      ipconfig /flushdns

      With Linux operating systems, you’ll use Terminal as your command line. To flush the DNS, simply execute this command:

      sudo systemd-resolve --flush-caches

      You may also need to flush the DNS cache for your browser. To do this in Google Chrome, paste the following line into your search bar:

      chrome://net-internals/#dns

      Then, click on Clear host cache. This will flush your browser’s DNS cache:

      Clear browser DNS

      After you successfully flush your DNS, check to see if this resolved the error. If not, you’ll need to try another method.

      5. Check the Uploaded File Size

      Sometimes, you’ll see the 400 Bad Request error right after uploading a file to a website. In this case, your file may be too big to upload to the site’s server.

      Every site has a maximum file upload size. Although this is set by the hosting provider, it usually falls between 2 and 500 MB. If you upload a larger file, you’ll likely receive a Bad Request.

      To see if this is the case, start by uploading a smaller file. If this is successful, you’ll need to resize or compress the original file.

      You can use a tool like TinyPNG to reduce file sizes:

      TinyPNG website

      If allowed by the site, you can also try uploading a zip file. Ultimately, you’ll want to reduce file sizes enough to stay within the server’s file size upload limit.

      6. Troubleshoot Your Device and Internet Connection

      When every single page you visit returns a 400 Bad Request, you might have a poor Internet connection. To see if this is the case, try switching to a different network. For example, you can turn off Wi-Fi for your mobile device and use cellular data.

      If this resolves the error, you can troubleshoot your Internet connection. You may need to restart your Wi-Fi router. Alternatively, consider contacting your service provider to fix the issue.

      You can also try turning your device off and back on again. Since this can clear Random Access Memory (RAM), flush temporary caches, and close running programs, it may help solve a Bad Request.

      Error-Free Browsing

      The 400 Bad Request error is a client-side HTTP status code that crops up when a server is unable to fulfill a request. This is usually caused by typos in the URL, corrupt browser cookies, or conflicting browser extensions.

      Fortunately, there are many ways to resolve the issue. One simple solution is to reload the browser and check for temporary glitches. However, you may need to flush your DNS cache, restart your device, or reduce uploaded file sizes.

      For more error troubleshooting tips, subscribe to the DreamHost blog! We’ll update you every time we post new content.

      Get Content Delivered Straight to Your Inbox

      Subscribe to our blog and receive great content just like this delivered straight to your inbox.



      Source link

      502 Bad Gateway Error: What It Is and How to Fix It


      If you run an online business, you’ll want your website to be available at all times. Unfortunately, WordPress problems like the 502 Bad Gateway error are common and can prevent users from accessing your site.

      The good news is that this error is relatively easy to fix. Once you’ve determined the cause, you can take the necessary steps to resolve the problem and make your website accessible again.

      In this post, we’ll take a closer look at the 502 Bad Gateway error message and its leading causes. Then, we’ll show you how to fix it. Let’s get started!

      What Is the 502 Bad Gateway Error?

      Whenever you try accessing a website, your browser sends a request to the site’s server. This server processes the request and returns the data (i.e., the site’s content).

      You’ll see an HTTP status code if something goes wrong during the process. Sometimes, this is accompanied by a message that describes the problem.

      A 502 Bad Gateway error indicates that the server received an invalid response from an inbound server and usually happens if the site is using a proxy or gateway server.

      The error message you see may vary, depending on your browser and the server you’re trying to access. However, typically you’ll receive one of the following alerts:

      • “502 Bad Gateway”
      • “502 Proxy Error”
      • “Error 502”
      • “HTTP Error 502 – Bad Gateway”
      • Temporary Error (502)
      • “502 Service Temporarily Overloaded”

      As you can see, the 502 status code may indicate an issue with the proxy server or a server overload. However, there are other possible causes of this error.

      What Causes the 502 Bad Gateway Error?

      Several issues can return a 502 Bad Gateway error. These include:

      • An unresolved domain name. The domain name might not be connecting to the correct IP address. This can happen because you’ve recently migrated your site to a new host, and the DNS servers haven’t yet finished propagating.
      • An over-sensitive firewall. If your site or your web host is using a firewall, it may be blocking certain internet providers or IP addresses. This happens when the firewall detects a false threat.
      • Server overload. The origin server may have crashed due to a sudden spike in traffic. This problem is more common if you’re on a shared hosting plan and your server has limited resources.

      It’s worth noting that the 502 Bad Gateway error doesn’t always indicate a problem with the server. It can also be caused by a client-side issue, like an outdated browser version or corrupted files in the browser cache.

      How Do You Fix the 502 Bad Gateway Error? (10 Possible Solutions)

      Now, let’s look at how to fix the 502 Bad Gateway error! We’ll cover two scenarios: an issue on the client side and a problem with the server.

      1. Refresh the Page and Try a Different Browser

      Let’s start with the simplest solution. The 502 Bad Gateway error could be a temporary issue. For example, the web server may have become overloaded for a few minutes or experienced a brief surge in traffic.

      Therefore, wait a few moments and reload the site. It’s also a good idea to try accessing the page on a different browser or device. This process will help you determine if it’s a client-side or server-side issue.

      Additionally, you could use a tool like Down for Everyone or Just Me, or Is It Down Right Now to confirm whether the problem is on your end or with the site’s host:

      The “Down for Everyone or Just Me” online tool

      If the results show that the site is up, you’ll need to try a few things on your browser and computer (which we’ll show you in the following steps). On the other hand, if the site is down for everyone, then you’ll have to go into your site’s back end to locate the problem — we’ll look into this later in the post.

      2. Clear Your Browser’s Cache

      Your browser might be storing outdated data for your site, which could lead to the Bad Gateway error. Alternatively, it may contain corrupted files that prevent access to your website.

      It’s a good idea to clear your browser cache. For example, in Google Chrome, click on the three dots in the top right-hand corner and select More tools > Clear browsing data.

      This will launch a popup window:

      Clearing the browser cache in Google Chrome

      Then, choose a time range, make sure the options for Cookies and other site data and Cached images and files are selected, and hit Clear data. Once complete, re-launch the browser and try accessing your site.

      The process for clearing cache in other browsers like Mozilla Firefox is similar. However, if this method doesn’t resolve the 502 gateway issue, you’ll need to move on to the next step.

      Get Content Delivered Straight to Your Inbox

      Subscribe to our blog and receive great content just like this delivered straight to your inbox.

      3. Flush the DNS Cache

      The 502 gateway error could also be caused by a Domain Name System (DNS) issue. For example, if you’ve just migrated your site to a new web host, the propagation process may take up to 48 hours.

      However, there might also be an issue with your local DNS cache. This temporary storage on your device contains information about visited domain names.

      To flush the DNS cache in Windows, press the Windows key, then type in “CMD” and hit Enter:

      Launching the Command Prompt in Windows

      This will bring up the Command Prompt window:

      The Command Prompt Window

      Here, you’ll need to type in the following command:

      ipconfig /flushdns

      When it’s ready, you should see a message that says, “Successfully flushed the DNS resolver Cache”.

      If you have a macOS device, you’ll need to enter the following command in the terminal:

      dscacheutil -flushcache

      Alternatively, you could temporarily change your DNS server to a third-party service, such as Google Public DNS.

      4. Check Your Site’s Error Log

      If your site is down for everyone and the problem is not with your device, you may want to check your error logs. These can help you identify what caused the issue. For example, a plugin conflict or update may have triggered the 502 Bad Gateway error.

      You’ll need to access your site’s files to view these logs. You can do this via the File Manager in your hosting account or a Secure File Transfer Protocol (SFTP) client like FileZilla.

      If you’re a DreamHost customer, log in to your account and navigate to Websites > Manage Websites. Select your site, then navigate to Manage Files and click on Manage:

      The DreamHost hosting account

      This will launch the File Manager. Click on the folder that contains your domain name, and look for wp-content:

      Open the folder and locate a file called debug.log:

      The debug.log file in the File Manager

      Look for the last logged error. It might give you clues as to what has gone wrong. You can then take steps to resolve the issue. For example, you might need to disable a plugin. (We’ll show you how in the next section).

      The process is almost identical if you use an SFTP client or a different hosting account. You can look for a file called error_log (or something similar) in your wp-content folder.

      5. Deactivate Your Plugins and Themes

      If you’ve installed a new plugin or theme, it might conflict with another tool on your site, prompting a 502 gateway error. A recent plugin update might also cause this.

      Since you cannot access your WordPress dashboard, you’ll need to deactivate your plugins and themes from the File Manager in your hosting account. Alternatively, you could use an SFTP client.

      If you’re a DreamHost user, log in to your account and open your site’s File Manager (as shown in the previous step). Then, go to wp-content and look for a folder called plugins:

      The plugins folder in the File Manager

      To deactivate your plugins, all you need to do is rename this folder. However, if you already know which plugin is causing trouble, you can locate it inside the plugins folder and rename its folder instead.

      You can now try accessing your site again. If it’s up and running, log in to the WordPress dashboard and re-activate each plugin one by one while refreshing the page. This process will help you identify the culprit.

      If you know which plugin is causing the 502 gateway error, we recommend removing it from your site or disabling it until the developers release a fix. You’ll just need to repeat the same process to deactivate your themes.

      Don’t worry if you’re still having issues after deactivating your plugins and themes— there are still a couple more things you can try.

      6. Disable Your CDN or Firewall

      The 502 gateway error could also be caused by your Content Delivery Network (CDN) or firewall. If you’re using Cloudflare, you can simply check to see if there are any reported issues.

      For example, the server might be undergoing scheduled maintenance:

      The Cloudflare System Status page

      Alternatively, try disabling the CDN to see if it resolves the issue. If you’re using a firewall, you might also want to deactivate it.

      You should be able to manage your CDN and firewall from your hosting account dashboard. If you’re unsure where to find these settings, we recommend contacting your web host for assistance.

      7. Restart PHP and Increase Your PHP Limits

      The 502 gateway error could also be caused by a PHP timeout issue. This happens when the PHP process takes longer than the maximum load time and the request times out.

      First, you might want to try restarting PHP. This could help resolve any connectivity issues. If this option is unavailable in your hosting dashboard, you might want to ask your web host to do it for you.

      Alternatively, you might need to change your server’s max_execution_time or max_input_time values. By default, these are set to 300 seconds. However, you can ask your web host to increase these values.

      8. Contact Your Hosting Provider

      If none of the above steps help solve your problem, you should consider contacting your hosting provider. They might be experiencing a server issue that’s affecting your site. If that’s the cause, there’s nothing you can do but wait.

      Additionally, they might be able to identify the source of the 502 gateway error and walk you through a solution. Most web hosts offer 24/7 support, so they should be able to resolve the issue quickly!

      Solve the 502 Bad Gateway Error

      The 502 gateway error is usually caused by an issue with the server. For instance, it might have experienced a spike in traffic that affected its performance and availability. However, this error could also be triggered by plugin conflicts and updates.

      To troubleshoot the problem, start by clearing your browser cache and local DNS cache to rule out any issues on your end. Then, you can try disabling your plugins, themes, CDN, and firewall. If you’re still experiencing problems, consider contacting your hosting provider for assistance.

      At DreamHost, our WordPress hosting plans come with 24/7 ticket support and live chat support. Our team of experts can help you resolve technical problems and get your site up and running again. Learn more about our plans!

      Do More with DreamPress

      DreamPress Plus and Pro users get access to Jetpack Professional (and 200+ premium themes) at no added cost!

      Managed WordPress Hosting - DreamPress



      Source link