While you already know how to fix a 502 bad gateway error, there’s another error that you commonly encounter when accessing a website or web service i.e 500 Internal Server Error.
It is worth noting that the 500 Internal Server Error is a server-side error and is not a fault from your end. So, the server administrator (or the webmaster) has to fix the error.
But, that does not mean you can’t do anything from your end. In this article, we shall mention some proven solutions for the visitors and the website administrators as well.
“500 Bad Gateway Error” is an HTTP status code that tells you that something’s wrong with the website/web service you are trying to access or visit.
In this case, the error is from the website’s end and not necessarily a problem on your computer/browser. Technically, there’s something wrong with the configuration of the website or the server resources fall short to help the webpage function.
In other words, the server encountered an unexpected error.
For webserver admins, we will be talking more about it in the later section of the article. But, if you are just a user (or visitor), you can try the following solutions:
This sounds ridiculous but sometimes the error is temporary and a simple reload helps you access the website without any issues. So, you need to try doing that first. Press Ctrl + F5 on PC, and Cmd + Shift + R to hard-refresh on Mac.
While you’re in the private mode (or the incognito mode), the browser does not store any cookies/cache for the content you access. So, if it was a cache-related issue, you should be able to access the website in the private or incognito mode.
You can refer to our guide on how to clear browsing data on Chrome, Firefox, and Edge to easily clear cache/cookies. Once, you’ve cleared it, try reloading the webpage again. As mentioned above, you can simply launch a new incognito browser tab, which is like a fresh browser.
If the above two solutions do not work, you can simply try to change your DNS server. You can either choose to change the DNS on your router or your Windows machine.
If your ISP (Internet Service Provider) is at fault, you can try using a VPN and then access the website to see if it works.
If you have a lot of extensions installed on your browser, try removing the ones you do not need. Sometimes the browser extensions cause a lot of issues – so you can try doing that as well.
Sometimes restarting your system (and your network equipment) does the trick. So, why not try it out if nothing else works for you?
Note: It is important to keep a backup of your website before trying to fix the issue. If you already have a backup, you can try restoring it as well to solve the issue.
The .htaccess file is the configuration file for servers running on Apache Web Server software. Sometimes, when you make any changes to your server or web application (such as installing a new plugin), the .htaccess file gets modified, potentially resulting in an error.
So, in that case, you just need to rename the old .htaccess file and create a new one. To rename, you can just add “.bak” as an extension to the original file – which will make it invalid.
After disabling the original htaccess file, create a new one and upload it to the server via FTP. Depending on what you have on your web server, the .htaccess file will differ.
For instance, if you’re running WordPress, you can refer to the official WordPress documentation for the default .htaccess file content.
In either case, you can choose to tweak the htaccess file to control caching, redirecting web pages, and several other options.
You need to make sure that your server is powerful enough. To verify that, simply check your resource usage to see if there was a CPU spike or if the memory limit was hit.
You can’t fix the issue if you have a server that’s not reliable and powerful – so you might need an upgrade if you notice something abnormal.
If you have a website running WordPress, you can simply follow the video below to make sure you troubleshoot every possible issue mentioned here. 500 Errors on WP sites are often caused by PHP that crashed, so check the PHP error log:
If you’ve made any recent changes, you should also verify the file permissions.
Depending on what you have on your web server – Apache software or Nginx – you might have to explore the correct file permissions that you need to potentially fix the issue and also keep your files secure.
Worst case scenario – in case you do not understand the solutions mentioned above, you should consult with the customer support of your host to help you fix the issue.
They might even fix it for you – or simply guide you to fix it for yourself. But, if you are not sure what you’re doing, you will have to contact your hosting provider to help you fix the 500 Internal Server error.
As you can observe, the 500 Internal Server Error issue is mostly a server-side issue.
If you’re not the website administrator, you should report the problem to the website admin if clearing cache/cookies or changing the DNS did not work out for you.
Most of the time – it is a temporary issue that gets fixed when you reload the webpage. But, if you still keep seeing the error, you probably have to wait for them (the website you’re trying to access) to fix the server error.