Why Do Websites Crash? 7 Tips to Avoid Disaster
Our independent research projects and impartial reviews are funded in part by affiliate commissions, at no extra cost to our readers. Learn more
If you’ve ever tried loading a website that keeps going down, you’ll know just how bad a crashing site is for user experience. And what’s bad for user experience is bad for pretty much everything else – it’s bad for business, for search engine rankings, and for revenue.
We all know that a website crash is bad. But why do websites crash? And what can you do to avoid it?
If your website is down right now, there’s no time to waste – here’s a list of the key reasons why websites crash:
7 Reasons Why Websites Crash
- Broken code
- Server error
- Wrong hosting
- Update issue
- Traffic spike
- Expired domain
- Malicious attack
By the end of this article you’ll understand each reason why websites crash, and what you can do to stop it happening to your own site. Let’s go!
1 Broken Code
Your website is written in code – that’s what makes it look and work the way it does. If you made changes to your site’s code just before it crashed, it’s likely that your code is broken.
Code is easily broken, because the smallest change or typo can mess up the whole meaning. Your website depends on every line of code working perfectly – so even a tiny error can cause everything to crash!
Here’s how to tell if broken code is causing your website to crash:
- You or your developer have recently updated or carried out maintenance on your site’s code
- Parts of your site are showing lines of code
Broken Code: What Can You Do to Avoid It?
Always be very, very careful when editing your site’s code – if you’re not sure what you’re doing, it’s best to hire a professional.
It’s a good idea to use a staging environment. This is designed for testing changes before publishing them on your live site – it’s an exact copy of your website, so it lets you play around to see how any changes will look.
Using a staging environment means you can catch any errors or glitches before launching a change on your actual website – perfect for spotting any broken code before it’s too late!
If you’ve already launched code changes and it’s gone wrong, you or your developer will need to carry out an in-depth analysis to find and fix the problem.
Find Out More
- Check out our Coding for Beginners guide to discover the best ways to learn HTML and CSS
2 Server Error
Your hosting provider hosts your website on servers. If these servers go down, so does your website. What’s particularly frustrating about this is that there’s nothing you can do to stop it.
Every web host experiences a certain level of downtime each year – this is when servers are “down,” causing your website to be unavailable to visitors. It’s unrealistic to expect no downtime at all, but your site shouldn’t suffer too much because of it!
Downtime is when the servers powering your site go down, making your site crash.
Uptime is the percentage of time your site’s servers are up and running each year – so you want as close to 100% uptime as possible!
How to tell if your host’s servers are causing your website to crash:
- Contact your web host to ask if they’re experiencing outages
- Check forums to see if others are having the same issues
- Read your site’s error messages – 502 and 503 error messages show that something is wrong server-side!
- Find out what your host’s uptime guarantee is – anything under 99.97% is less than ideal
Server Errors: What Can You Do to Avoid Them?
If your site keeps crashing due to your web host’s servers going down, you may need to switch to a new host with better uptime.
Ideally you want no more than three hours of downtime per year, so look for a hosting provider with a minimum 99.97% uptime guarantee if possible.
The best uptime we’ve seen so far belongs to HostGator, with an impressive 99.99%!
3 Wrong Hosting
If your web host has terrible uptime, we recommend switching to a new provider. But that’s not the only way hosting might be making your website crash… It might be that you’ve chosen the wrong hosting type or plan for your needs.
There are many different types of hosting. The main ones include:
- Shared hosting
- VPS hosting
- Cloud hosting
- Dedicated hosting
- WordPress hosting
Within each of these hosting types, there are different levels of plans and packages. If you use a good quality web host but you’re still having problems, we recommend taking a close look at the plan you’ve chosen.
Most people start off with shared hosting. It’s easy to see why – it’s super cheap, and not too technical to manage for first-timers. However, it’s also very limited and easy to outgrow. A website that’s hosted on a basic shared plan will crash if it needs more resources than your plan provides.
The bigger a website is, and the more traffic it receives, the more resources – like storage, bandwidth, and memory – it needs to run smoothly.
How to tell if your web hosting plan is causing your site to crash:
- You haven’t updated your plan in a while
- Your site has grown a lot since you chose your plan
- You’re reaching the limit of your storage or bandwidth allowance
Hosting Plan Crashes: What Can You Do to Avoid Them?
Luckily, this is an easy fix. If you realize you’re on the wrong plan, simply upgrade!
Reassess your website’s needs and check that your plan is still providing you with enough resources, especially if you haven’t updated your plan in a while.
Start by ensuring your plan gives you enough storage and bandwidth and go from there.
On the whole, we don’t recommend staying on a shared plan, because they’re so limited. You share a server with other websites, so your site may still crash if another website is sucking up too much of your server’s resources. VPS hosting, on the other hand, is pricier but also more reliable.
Find Out More
- Our guide on How to Choose a Web Host helps you pick the right web host and plan for your needs
4 Update Issue
Website crashes caused by update issues most commonly affect WordPress and other CMS users. This is because WordPress runs frequent updates to keep its platform running as smoothly as possible. If you don’t keep up with these updates, your site becomes outdated and glitchy, and is even vulnerable to attacks.
A common problem happens when people update certain aspects of their site, but not others. If you don’t update everything, the different elements may become incompatible and stop working with each other.
Think of it like jamming a car part from 10 years ago into your brand new engine. Sure, it’s the same make, but your car isn’t going to run smoothly!
The same goes for your website. You need to update all parts of your WordPress site to keep it up and running.
How to tell if an update issue is causing your website to crash:
- You run your site on WordPress or another CMS
- You’ve recently made one or more updates
- You haven’t run any updates in a long time
- You don’t have automatic updates turned on for your site
- You have old, outdated plugins on your site
Update Crashes: What Can You Do to Avoid Them?
First of all, always backup your site before making updates. Trust us, it’s better to be safe than sorry!
Always keep an eye out for software updates to make sure your site is running on the latest version of your CMS.
If you use WordPress, our top tip is to choose a good WordPress host that runs updates for you automatically! For example, Bluehost automatically installs the latest version of WordPress for you, and then continually runs updates to keep your site up to date.
Another common issue happens when people update their core software, but forget about their plugins or themes. Some web hosts include plugin updates automatically, but it’s not super common. So if your web host doesn’t offer this, don’t forget to keep updating your plugins and themes whenever prompted.
In WordPress, you can manually check for updates in your side menu – go to Dashboard > Updates to view any pending updates.
If a plugin hasn’t offered an update in a while – a few years, say – then it may be worth switching to a new one that’s more active.
5 Traffic Spike
Your website has a certain amount of bandwidth that determines how much traffic it can handle at once. If you receive a sudden surge of traffic, your site will crash if it doesn’t have enough bandwidth to support the higher number of visitors.
Your site’s bandwidth is usually dependent on your hosting plan. The better your hosting, the more bandwidth you’re likely to have, and the more traffic your site can handle at any given time.
Bandwidth, also called data transfer, is the maximum amount of data that your site can transfer to your visitors. So the more visitors there are on your site, the more data is transferred, and the more bandwidth is needed to keep your site available to everybody.
How to tell if a traffic spike is causing your website to crash:
- You’re running a sale, promo, special event, or have gone viral
- It’s a busy time (for example, even large online stores crash on Black Friday)
- Your analytics show that you’ve received a record number of visitors
- You’ve ramped up your marketing recently
- You’re on a basic shared plan but receive a large volume of visitors
Traffic Crashes: What Can You Do to Avoid Them?
Upgrade Your Hosting Plan
If your website is growing and can no longer handle the amount of visitors it receives, it’s time to upgrade your hosting plan. Usually, cheaper plans have smaller bandwidth limits, so chances are you’re on a hosting plan that’s too basic for your needs.
Many basic shared hosting plans claim to provide you with unlimited bandwidth – just know that this is sometimes too good to be true. A $1 per month hosting plan isn’t going to support endless amounts of traffic, so don’t be surprised if it turns out there are actually limits on your “unlimited” plan.
Try Cloud Hosting
If your site often receives sudden traffic spikes – your store runs popular sales, for example – you should consider cloud hosting. This is a flexible type of hosting that hosts your data across multiple servers to spread the load. Some providers even let you customize your plan to suit your needs, so you can up your bandwidth before a large promotion!
Use a CDN
A Content Delivery Network (CDN) stores copies of your website on servers around the world, so that it loads your site from the nearest server to your visitors. This means your site loads faster for visitors in various locations, and reduces the amount of work your main servers have to do.
6 Expired Domain
Have you forgotten to renew your domain name? If so, that could be the reason your site is down!
Your domain name is the address that visitors use to find your website. Every website needs a domain name, so if your domain expires, your site will crash.
Alternatively, you may have problems in your domain settings – for example, if you’ve tried to point your domain to a new site, and it’s gone wrong.
How to tell if a domain issue is causing your website to crash:
- You haven’t renewed your domain name
- You’ve recently changed your domain settings
- You see a “This site can’t be reached” message in your browser
Expired Domain Crashes: What Can You Do to Avoid Them?
Renew your domain name! Ideally, you should also turn on auto renew for your domain to be totally sure that this simple – but very common – cause for website crashes doesn’t happen to you.
Autorenewal will automatically re-register your domain for the same period again, without you having to go and do it manually. We also recommend putting a reminder in your phone or diary for a month or so before renewal, so that you have plenty of time to prepare.
Once your domain name expires, other people can register it, meaning you could actually lose your domain – so renewing on time is doubly important!
7 Malicious Attack
Sadly, there are a lot of people out there who attempt to hack websites, whether to gain personal information or simply to bring a website down. There are many different types of attacks, but one common tactic is called Distributed Denial of Service (DDoS).
DDoS is when a hacker floods your website with fake traffic from many different sources, overloading the server and causing your website to crash. This is another reason to choose good quality hosting that provides DDoS protection, as these attacks are difficult to prevent yourself.
It can be hard to tell if your site is crashing due to a genuine traffic spike or a DDoS attack. Here are a few signs that a malicious attack may be what’s causing your website to crash:
- Your site is experiencing an unexplainable spike in traffic – sudden traffic surges don’t happen out the blue!
- The traffic spike is lasting longer than you’d expect – genuine traffic spikes usually only last a short time
- Your analytics tools show specific traffic sources querying data long after the Time to Live (TTL) has passed
Malicious Attacks: What Can You Do to Avoid Them?
The first thing we recommend is to find secure, reliable hosting with good security measures in place. This is one of the best ways to protect your site. Good security defenses include:
- Reinforced DDoS protection
- Virus scanning and removal
- Brute force defense
- Server hardening
- 24/7 security monitoring
- Two-factor authentication
Often DDoS are automatic and websites are randomly selected. There’s not much you can do to prevent them at the source, meaning you need excellent defenses in place to protect your site.
Other ways to protect your site include:
- Choosing a secure password or passphrase and updating it regularly
- Updating your site – an outdated site is more vulnerable to attacks
- Using only secure internet connections, rather than public ones
- Limiting the number of login attempts on your website’s admin page
Find Out More
- Learn How to Secure a Website for more advice on protecting your site from malicious attacks
Your Website Has Crashed – Immediate Next Steps!
So your website has crashed – what now? We’ve outlined helpful steps to avoid and combat website crashes throughout this article, but what if your website is down right now? Here are some things to do straight away:
#1. Check Your Website Has Actually Crashed
It’s easy to listen to the panicked voice in your head when your site refuses to load. But before you assume the worst, check that your website really has gone down. For example, try visiting some other websites to check that it’s not your internet connection that’s actually the problem!
It could be that your site has gone down very briefly, due to an update or server blip, so make sure to refresh your browser or open up an incognito tab – it could be a caching issue still showing the error page!
#2. Determine the Cause
If you find that your website has crashed, don’t panic. Look through the most common causes of website crashes above and see which is the most likely for your website.
An important step here is to check if there’s been any security breaches. It’s important to act quickly, resetting passwords and alerting clients if there has been a data breach.
Once you know the cause it’ll be easier to get your website back online…
#3. Contact the Right People to Find a Solution
Once you know why your website has crashed, you can start fixing that issue.
For example, if your server is down, contact your hosting provider and ask to be updated on their progress. If your site recently had an update, contact your web developer to alert them that something has gone wrong.
During this step, communication is key. You need to act quickly but calmly – it can be frustrating and even scary when your website crashes, but shouting at your web host isn’t going to fix the problem any faster. Be clear and detailed, and don’t be afraid to chase up on progress reports!
#4. Firefight to Reduce Negative Impact
It’s important to remember that your visitors don’t know what’s happening while your site is down. Here are few things you can do to keep them in the loop:
- Send out emails or social media statuses alerting people that your site is down, but that you’re working on fixing it
- Provide status updates that empathize with your users
- Create and redirect to a landing page with a message explaining what’s going on – this stops users feeling in the dark
- Pause any promotions or campaigns, so that you’re not driving more traffic to your website – if you’re running a limited-time promotion, extend it so people don’t miss out
#5. Confirm the Crash Is Fixed
It’s important to know that the cause of the crash is totally resolved – by confirming and treating the cause of the problem, you minimize the risk of it happening again. Whether you’re fixing the crash yourself or you’re relying on someone else, make sure you’re confident that it really is resolved.
#6. Let Your Visitors Know You’re Back Online!
Once you’re confident that the issue is over, spread the news fast! Use social channels and email to alert your audience that they can visit your site once again – and make sure to thank them for their patience.
If you set up a redirect to a landing page explaining the crash, don’t forget to remove this before you start sending people back to your site!
Why Do Websites Crash? Summary
Now you know the most common reasons why websites crash – and, more importantly, you know the signs to look for and what to do to prevent them.
If your website goes down it can be scary, but the trick is not to panic. Even big websites like Amazon experience outages once in a while, so it’s not uncommon for websites to crash and cause disruption.
Some things – like remembering to renew your domain name – you can control, while others – like DDoS attacks – are harder to prepare for. Here’s a recap of the main reasons your website may be down:
Why Websites Crash: 7 Reasons
- Broken code
- Server error
- Wrong hosting
- Update issue
- Traffic spike
- Expired domain
- Malicious attack
Always back up your site regularly, so that even if the worst does happen, you’ve got a recent version of it to restore. If your site is down right now, it’s time to get you back online – good luck!
Leave a comment