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 more 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 a visitor’s point. If you are trying to visit a website and face a 503 error.
  • The second is from the webmaster/owner perspective; the error occurs on the server side and how you may fix this.
  • The third point is regarding the 503 error and its SEO consequences. What if your website is down due to a 503 error and how do 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 a website designer or developer, you may experience different types 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 the website owner – why this error is occurring?

As a website owner, webmaster, or person dealing with the ongoing operations of your website, you should be highly concerned about why your website is/was down due to a 503 error.

As mentioned earlier, two common reasons for 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. Maybe, your hosting company sent an email notifying you about the server upgrade, replacement of old hardware with a new one, installation of a security patch, or some other reason.

Similarly, you might ask the 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 cases above and still you are seeing the website is down and showing error 503 then the next thing you should look at is the “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 media factors; your website/products/services got shared by visitors on different social networks like Facebook, X (formerly Twitter), etc., and that caused an increase in traffic.

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

So what to do with a sudden hike in visitors?

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

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 (in GA 3).

This report tells you the source of traffic. This can really help in determining which steps to take to avoid a 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 ongoing thing.

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

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

Let’s say, if you are on the shared hosting with 256MB RAM and 1 Core 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 upgrading 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 liked your products/pages and shared the stories on Facebook/Twitter, etc.?

Similarly, do you run an ad campaign on Google Ads or Facebook ads, etc. during the holiday season?

All that resulted in a 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 regular traffic, but as it increases due to any of above mentioned factors, it is unable to handle this.

What happens 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 a campaign) it becomes overloaded and refuses the request sent by the browser. During this period, your visitors start 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 the user’s request.

The way forward for these temporary traffic spikes is moving to hosting providers that are flexible in resources.

They automatically upgrade the hardware required during traffic spikes and return to normal levels during regular traffic periods.

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

What can be other reasons for server overloading?

http 503 WordPress

Let us say that your website is getting around one thousand visitors per day and the site is running smoothly.

Your website is based on the WordPress platform and you are required to install new plug-ins and the 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 are not developed keeping that in mind by the 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 the 503 – site temporarily unavailable issue resolves.

WordPress Theme

Similarly, if you installed a new theme or upgraded the current one and soon started seeing 503 complaints. 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 a malicious attack on your server. In that case, you should contact the hosting company and discuss the issue.
  • Something has crashed the server. Restart running processes.
  • The 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 a Microsoft IIS Server?

http 503 IIS

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

“503 – Service unavailable”

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

Sub code Description
503.0 Application pool unavailable.
503.2 Concurrent request limit exceeded.
503.3 ASP.NET queue full
503.4 FastCGI queue full

 

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

Trying to fix HTTP 503 on the 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 refreshing 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 check 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 the DNS server. In that case, your devices (computer, modem, switch) are right but the DNS server which is set to match the domain names that you access from a computer or smartphone 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 try crawling your website while your site is in maintenance mode.

You may be adding more resources, updating plug-ins, themes, 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 a 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 the 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 a specified duration.

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