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.

What Is A 500 Internal Server Error?

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:

Potential Solutions To Fix 500 Internal Server Error: For Users

1. Reload The Webpage

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.

2. Launch Private Mode To Access The Website

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.

3. Clear Cache/Cookies Of Your Browser

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.

4. Change DNS Server

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.

5. Use A VPN

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.

6. Get Rid Of Unnecessary Browser Extensions

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.

7. Restart Your System / Network Equipments

Sometimes restarting your system (and your network equipment) does the trick. So, why not try it out if nothing else works for you?

Potential Solutions To Fix 500 Internal Server Error: For Webmasters

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.

1. Creating A New .htaccess File

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.

2. Verify The Server Resources

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.

3. Fix Your WordPress Site

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:

4. Check Your File Permissions

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.

5. Contact Your Host

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.

Wrapping Up

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.

Filed in Web..