A little about http 503 error code

The “503 Service Unavailable” status code indicates that the server you are trying to access is temporarily down due to overloading or server maintenance issues.

By overloading (normally) means your website is getting much traffic than the server capacity. This is explained in the section below.

In this tutorial, I will explain http 503 status code from three perspectives.

  • The first is from visitors point if you are trying to visit a website and face 503 error.
  • The second is from the web master/owner perspective; the error occurs at server side and how you may fix this.
  • The third point is regarding 503 error and its SEO consequences. What if your website is down due to 503 error and how search engines take that?

So, if you are just learning what is 503 error code in general then keep on reading the entire article. Otherwise, you may jump directly to the section that relates to your situation.

How 503 error is visible?

As 503 error can be customized by website designer or developer, you may experience different type of messages as seeing 503 error. A few commonly visible 503 status messages are:

503 Service Unavailable

503 Error

HTTP 503

503 Service Temporarily Unavailable

And so on.

http 503 visible

I am website owner – why this error is occurring?

As a website owner, webmaster, or a person dealing with the on-going operations of your website, this should be highly concerning that why your website is/was down due to 503 error.

As mentioned earlier, two common reasons of HTTP 503 error status are:

  • Maintenance of the server
  • Overloading

If this is due to maintenance, many chances are that you are aware of the downtime. May be, your hosting company sent an email notifying about the server upgrade, replacement of old hardware by a new one, installation of a security patch or some other reason.

Similarly, you might ask hosting company to add/replace something in the server and meanwhile your website is down and showing 503 error code to your visitors.

However, if none of the case above and still you are seeing the website is down and showing error 503 then the next thing you should lookup is “overloading” issue.

The overloading can be caused by more traffic than the server capacity. For example, if you are using a shared hosting plan and your initial web traffic was around one thousand visitors per month then your current hosting plan might be good enough to deal with that.

With the passage of time, as you kept on adding new content or your website got some good links and Google, Bing or other engines started ranking you better then you may experience the influx in traffic regularly.

The same traffic increase could also be due to social factor; your website/products/services got shared by visitors on different social networks like Facebook, Twitter etc. and that caused an increase in traffic.

Similarly, if you are on a VPS or dedicated server and was getting about 10K traffic per day. Suddenly, traffic increased to 20Ks and website started showing 503 error then consider the fixes below.

So what to do if a situation is like this?

You are seeing an increase in traffic and server is started getting down with “503 service unavailable”? In that case, I will suggest performing proper analysis before taking any decisions – especially if you are concerned about hosting cost.

Traffic Analysis

If you are using an analytics service like Google Analytics then it tells you how many visitors are from which sources. A screenshot is shown below from Google Analytics:

http 503 google analytics

You may access this report under the:

Acquisition –>  All Traffic –> Source/Medium

This reports tells you the source of traffic. This can really help in deicding which steps to take to avoid website down by 503 error due to overloading. Consider two scenarios below:

Scenario 1 – Traffic increase by Google

As said earlier, if traffic increase is due to adding content over the period of time or for some other reason Google started ranking you better then this should be an on-going thing.

The traffic may be consistent over the period of Weeks or months and again Google Analytics is your friend there to see traffic pattern.

If that is the case that traffic increase is consistent and not seasonal (for a day, or Week or so) and you are seeing website down due to 503 then this is the time to think increasing the resources of your server.

Let’s say, if you are on the shared hosting with 256MB RAM and 1Core CPU then consider increasing this to 512 MB and one more core. You may also consider moving to VPS (Virtual Private Server).

Similarly, if you are on a VPS server with 2GB RAM / 2 Cores (apart from other resources), you may consider to upgrade the VPS resources.

The upgrade that you get should go permanent as your traffic increase is consistent.

Scenario 2 – Traffic increase is temporary

So, your website got featured on a popular news site or customers really liked your products and shared the stories on Facebook/Twitter? Similarly, you ran an ad campaign on Google Ads or Facebook ads etc. during black Friday or holiday season?

All that resulted in traffic spike but only for a few days or weeks and then back to normal traffic, Right?

In that case, your current server capacity is such that only can deal with the regular traffic, but as it increases due to any above mentioned factors, it is unable to handle this.

What happening is, say you get 30 visitors at a time (on average during peak hours) and CPU/RAM is enough to deal with it. When it reaches 60 (as running campaign etc.) it becomes overloaded and refuse the request sent by the browser. During this period, your visitors starts seeing “503 – Service unavailable” message.

As this request is refused to many visitors till resources are free or users are gone themselves – the server becomes available and starts entertaining user’s request.

The way forward for this temporary traffic spikes is moving to hosting providers that are flexible on resources. They automatically upgrade the hardware required during traffic spikes and return to normal levels during regular traffic period.

In that case, they will charge you more only for the period when your website consumed more resources.

What can be other reasons of overloading?

http 503 WordPress

Let us say that your website is getting around one thousand visitors per day and site was running smoothly. Your website is based on the WordPress platform and you required installing new plug-ins and site started seeing 503 error for the same number of visitors.

Plug-ins

In that case, the installed plug-in(s) may be the reason for that. Certain plug-ins consume many resources and not developed keeping that in mind by developer. You should read reviews by other users if that is the case.

The recommended step will be uninstalling plug-ins one by one and seeing the resource usage and if 503 – site temporary unavailable issue resolves.

WordPress Theme

Similarly, if you installed a new theme or upgraded the current one and soon started seeing 503 complains. In that case, either contact the theme developer especially if you are using a premium (paid) theme or if you are a developer then consider looking at the code yourself.

Other possible causes of 503 status code

The 503 error can also appear due to these reasons:

  • DoS attack. The DoS stands for Denial of Service and that can be due to malicious attack on your server. In that case, you should contact the hosting company and discuss the issue.
  • Something is crashed on the server. Restart running processes.
  • Limit of connections can also be a problem. For example, your website is set to deal with 25 MySQL connections concurrently. Increase this and see if it helps.
  • Bandwidth issue. If your website is using heavy images or you have hosted videos then bandwidth limit or shortage can also be an issue. Check the bandwidth usage in your control panel and compare it with the available bandwidth with your hosting deal.

What if I am using Microsoft IIS Server?

http 503 IIS

If website in question is hosted on Windows IIS server then it gives more specific description of the 503 error. The general error description is the same:

“503 – Service unavailable”

However, the sub-codes give more specific reason as listed below:

  • 0 – Application pool unavailable.
  • 2 – Concurrent request limit exceeded.
  • 3 – ASP.NET queue full
  • 4 – FastCGI queue full

For more details on https status codes in IIS, go to Microsoft official website here.

Trying to fix HTTP 503 at client side

As said above, the 503 status code/error is related to the server. Whether you are the owner or the user of the website, you may try these:

Restart router/modem

If the error description is “Service Unavailable – DNS Failure” then you should try refresh the website after restarting the router or modem.

Try third party website – It’s not you only

You may confirm whether it’s only you or across that website is down or not. For that, you may use websites like https://www.isitdownrightnow.com/ that checks if the website is down for you or all. Many other websites are also available like this to check whether a website is down for you or all.

Refresh website

Press F5 or ctrl+R – it should refresh the web page you are trying to access. As I said earlier, the 503 error does not indicate that the server is corrupted – it may be a temporary glitch and can be fixed automatically as soon as resources are available to the server.

Switch DNS server

The 503 http error can also be caused by DNS server. In that case, your devices (computer, modem, switch) are right but DNS server that is set to match the domain names that you access from computer or smart phone is doing the problem.

You may contact your ISP regarding this issue for changing the DNS server or try using freely available e.g. provided by Google or OpenDNS.

In that case, first make sure that the website you are trying to access is down for you only.

HTTP 503 server error and SEO

This is an important aspect if you are getting traffic from Google and other search engines. As an owner of the website, you would not want Google to try crawling your website while your site is in maintenece mode.

You may be adding more resources, updating plug-ins, theme or MySQL database. Similarly, updating the WordPress version to the latest release or any other situation that your web server needs to get down then what you should do?

The answer is returning the 503 response code!

As Google tries to crawl your website and faces 503 error it takes this as the website is temporarily down for maintenance. So, it will retry crawling the site/specific page(s) after the specified duration.

The next question is how to set the duration for 503 response code?

By definition, the 503 status code description states the following (as per w3.org):

The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. The implication is that this is a temporary condition which will be alleviated after some delay. If known, the length of the delay MAY be indicated in a Retry-After header. If no Retry-After is given, the client SHOULD handle the response as it would for a 500 response.

So, you may use Retry-After header for addressing Google or other search engines to crawl the website after specified duration.

Google will at least not re-crawl the website before that duration, however, how after that time depends on its crawler.