Dealing with website traffic spikes – stop your website crashing

We all want more website traffic, but what do you do if you're expecting a big traffic spike and don't know if your site can cope? What can you do if you've already gone through this pain and seen your site collapse when confronted with too many visitors in a short space of time?
22 Mar, 2014
Google Analytics screenshot showing large active visitors

Could your website cope with 66 concurrent visitors?

Traffic spikes are (unfortunately) not something that most website owners need to worry about. We all want more traffic, but most websites actually end up with no more than perhaps a few dozen visits per day. This is hardly challenging for most web servers.

However, getting a huge amount of traffic all at once can sometimes do more harm than good to your business – especially if you are unprepared.


Getting a sudden burst of traffic could lead to a poor experience for your visitors just at the wrong moment. It might even result in your site being taken offline.

What can cause traffic spikes?

Usually, website traffic grows gently over time. This gives website owners ample opportunity to take action before the proverbial hits the fan. Occasionally, however, something happens that prompts a lot of people to check out your website all at once, causing a spike in traffic. This could be anything from a successful marketing e-shot to a prominent mention on TV that identifies your memorable website.

A real-life traffic spike example

My client was hit by a traffic surge a few weeks ago, rendering her site unusable for many hours. This resulted in threats to take the site offline altogether by her web hosts. Here’s what happened…

The website had been working quite nicely for many months. Daily traffic had been consistently around 100 unique visitors. To promote a paid membership on the site the owner (let’s call her Olivia) decided to send a large mailshot. She sent a Mailchimp newsletter to 50,000 contacts in her niche, which she had built up over several years. Unlike many mailshots, this was highly relevant, with a really compelling offer that was just right for the target audience. Perfect, you might say!

Graph showing massive website traffic spike

Spot the day the marketing email went out!


In fact, the mailshot was so successful that within the first hour, the website had registered almost 2,000 visits. Things continued at only a slightly lower pace for the rest of the day. Although Olivia recorded lots of membership sales, she was bombarded with complaints from people who failed to get onto the site. Some had partially completed the purchase process before the site died on them. In addition, her website host threatened to take the website offline. This was because she was breaching her hosting agreement by impacting other sites on their shared server.

Image of traffic spike in website

What time of day did the marketing email get sent – I wonder?


It’s clear that Olivia would have made more sales had the site stood up to the spike in traffic.

How to handle website traffic spikes

Here are 7 things that will make your website more resilient when it gets a spike in traffic…

  1. Install server-side caching – many web development platforms build content on-the-fly, such as WordPress and Joomla. This adds work to the server every time a page is requested. There are plenty of cache plugins and extensions around for these products. These store pre-built page content for a short period of time so that repeated requests for the page don’t need to go through the whole page build process. These are simple to install and can be highly effective;
  2. Get a better server – you need a server that is fit for the job. Shared hosting is fine for small-traffic sites (or even medium-traffic sites that are well-optimised). Ultimately a bigger box with more memory, better systems software, and dedicated resources will be best. Look at a VPS or a dedicated server. A cloud hosting service might also be worth considering. Most allow you to instantly boost the resources available to your website as and when they are needed. Good, professional website hosting can be achieved at a reasonable price;
  3. Make sure your content is rendered quickly – this is important regardless of the volume of traffic you’re getting. Search engines and real visitors prefer websites that load quickly, so make sure you aren’t serving huge images. Simple, but perhaps time-consuming to implement;
  4. Use a content delivery network (CDN) – if you have lots of static resources on your site then try using a CDN to distribute the files to various servers around the globe. This will ensure your files are served from the closest point to your visitor’s location and will remove the need for your server to do the work;
  5. Consider Cloudflare – this is effectively a content delivery network, but with the added advantage that your content is optimised and they can also protect your website from malicious attacks. Setup is fairly straightforward, although there are quite a few options to consider (especially with the excellent paid pro-version);
  6. Try compressing your web page content – deliver your web pages as compressed (zipped) files and leave the unzipping to the visitor’s browser. This could really reduce the load on your site AND deliver your content quicker.
  7. If you have a database-driven website (which can include websites that run content management systems such as Joomla, Drupal, and WordPress) make sure that the number of concurrent database connections is high enough to cope with your expected traffic. Every time someone visits a website on one of these systems it results in database calls. Usually, there are a limited number of concurrent connections allowed. If this is exceeded the visitor will get a rather brief and unfriendly ‘Too many database connections’ message. Increase the setting for the number of concurrent database connections as much as you can. If you don’t know where to look to increase this, ask your website hosts if they can help. If you expect traffic spikes it’s polite to let your web hosts know, especially if other websites on the server could be affected, but they might also be able to change some server settings or shift resources to help you out;

Of course, depending on your time and budget, these steps are good practice recommendations for any website – even if you only get 100 visitors a day, isn’t it best to deliver the pages they want as fast as possible?

Fast website = Happy visitor = More engagement = More sales!

It’s good for your SEO too

Search engines might just rank you a little higher too, so isn’t it about time you backed up that great content you’re publishing with a website infrastructure that matches it?

Giving precise instructions or suggestions for each point is beyond the scope of this post, but a quick search in Google should give you the information you need…

By the way… did we mention we can get your website performing quicker for you? If you want a faster website (or if you’re just confused with all the options available) then get in touch now and we’ll help out.

1 Comment

  1. Anam

    I just received an email from addthis site advising that my site traffic has spiked and wasn’t sure how to resolve this issue hence I searched on google then found your article. It helped me a lot.


Submit a Comment

Your email address will not be published. Required fields are marked *

You may also like…

Why is my website traffic falling in Google Analytics?

Why is my website traffic falling in Google Analytics?

Have you noticed your website traffic falling over the past few years? If you use Google Analytics, you may be seeing a decline in traffic. This might not be a genuine decline. We explore the reasons for this in our article.

The Benefits Of Regular Website Updates

The Benefits Of Regular Website Updates

We think it’s important to continually update your website to keep it secure, load fast, and provide the content your visitors need. Find out what website updates you need, and what you need to do to get them done.

Share This
Martin Jarvis

Martin Jarvis

I typically reply within an hour

We're here Monday - Friday during UK working hours. Drop us an email and we'll get back to you.

Martin Jarvis
Hi. It's Martin here. How can I help you?
Start Chat with: