What is a 404 Error?
A 404 page, or 404 error, appears when a website can’t find the specific page someone is trying to reach. In short, the browser successfully connects to the site, but the specific page or content they’re looking for isn’t available.
A 404 is one of many HTTP status codes (ranging from 100 to 500), the three-digit numbers that tell browsers and users how a webpage request went.
For example, a 200 code means everything worked perfectly, while a 500 error indicates a server problem. A 404 code, in particular, signals that a requested page couldn't be found. Understanding these codes can be valuable for SEO, as they help identify and fix site errors that could affect search rankings.
In this brief guide, we’ll walk you through the basics of 404 errors and ways to address them. Let’s dive in!
What Does a 404 Page Error Look Like?
Here's a classic example of a 404 error page:
And here’s another example of a 404 page with better user experience (yes, that's us):
In our example, the user experience is better because…
- We try to empathize with the visitor, indicating we’re also frustrated that they couldn’t reach their goal page.
- We don’t overwhelm them with unnecessary links (in the first example, 3 links seem to be there for internal linking purposes only).
- We use a more straightforward, conversational language.
Why Does a 404 Error Show Up?
As stated previously, this error means the page you’re looking for isn’t available for some reason. Some common reasons for a 404 error are:
- A page has been moved to a new URL, and the old URL no longer works.
- You didn’t set up any redirects to send users to a new page, if there is one.
- The page has been removed for good, and no longer exists on the website.
- There's a typo in the URL.
Are 404 Errors Bad?
A 404 error isn’t always a negative thing. If a page has been removed and isn’t coming back, it’s completely normal (and even helpful) to show visitors that the page is no longer available.
When a URL shows a 404 status, Google typically removes it from its index over time, helping keep outdated or irrelevant content off search results. However, this process can take anywhere from a few days to several weeks. The timing depends on factors such as how often Google crawls your site and how frequently the page was updated before it was removed.
That said, users generally don’t enjoy landing on a 404 page. So, while it’s fine for truly outdated URLs, you want to avoid creating links to pages that don’t exist.
Thankfully, there are ways to turn 404s into a more positive experience!
How Do 404 Pages Affect SEO?
Firstly, if search engines repeatedly try to access a page and fail with the 404 code, it will hurt the page’s rank. It’s a negative signal, and it will cause the page to be removed from the index and the SERPs.
If you want that page to stop being indexed, that’s fine. But if it’s happening to a normal page because of a faulty URL, you’ve got an SEO problem.
Secondly, search visitors want a smooth experience. But if your site consistently shows 404 errors, it frustrates users and makes it harder for them to browse through your products or services. They’ll leave and check out your competitors instead. Plus, if users bounce quickly from your site, search engines will take note, which could hurt your rankings.
How to Fix 404 Errors
Before you begin, assess if the pages were intentionally removed. If a page was permanently removed, it might be better to return a 410 status code instead of a 404.
The 410 status indicates to search engines that the page is gone for good, while a 404 just means the page can’t be found temporarily.
- Use Google Search Console to monitor crawl errors. To monitor and fix 404 errors on your site, start by using the Crawl Stats report in Google Search Console. This report shows how often Google crawls your site, the status of those crawls, and any errors like 404s.
- Use Google Analytics to monitor the quantity of 404 errors on your page. This will help you understand the impact of each error on your users’ experience. For example, if you’re running a PPC ad that sends traffic to a specific landing page, monitoring 404 errors can ensure that users aren't landing on broken pages. Google Analytics can also help you identify which redirects are affecting users who click on those ads, so you can fix them promptly.
Using WordPress? Here’s How to Fix 404s With and Without Plugins
Fix 404s on WordPress with a Plugin
You can fix 404s on WordPress by using the Redirection plugin. This plugin helps you redirect changed URLs to their new destination. Here’s how to use it after downloading and installing:
- Once the plugin is downloaded and installed, go to Settings and then the 404 tab.
- Tap to review any issues detected.
- Fill the Redirect section with the URLs from which you want to redirect.
- Add the new URLs, the ones that you want to redirect to in the destination tab.
- Save changes.
You can also use the following plugins:
Redirecting 404 Pages in WordPress Without a Plugin
If you won’t be using a plugin, you can follow these steps to redirect the 404 to another destination:
- Open your website’s Cpanel and navigate to the root files of your WordPress installation.
- Look for a file named 404.php in your theme’s directory (usually found in wp-content/themes/[your-theme-name]). If it doesn’t exist, create a new 404.php file.
- Add conditional statements in the 404.php file to redirect specific URLs to the intended destination. Here’s an example of code you could use:
<?php // Check the requested URL and redirect to the correct page based on conditions $requested_url = $_SERVER['REQUEST_URI']; if (strpos($requested_url, 'old-page-url') !== false) { header("Location: /new-page-url", true, 301); exit(); } elseif (strpos($requested_url, 'another-typo-url') !== false) { header("Location: /correct-url-for-typo", true, 301); exit(); } // Add additional conditions as needed // Default 404 content if no redirects match echo "Sorry, the page you’re looking for doesn’t exist."; ?>
- Save the changes to 404.php and test it by entering the old or typo-prone URLs to make sure they’re redirected correctly.
Now, you might be asking: “Should I be redirecting a 404 page to my homepage?”
Some website owners automatically redirect 404 pages to the homepage, but this is not recommended.
Users often don’t realize they’ve been redirected, which can confuse them about why they ended up on the homepage instead of the page they were looking for.
Know that redirecting should be reserved for cases where a page has moved or been replaced by a more relevant one, like a parent or category page, or a close alternative to a discontinued product.
Plus, it’s okay to show a 404 when a page no longer exists. Sometimes, it’s better to let users know the page is permanently gone rather than redirect them to an unrelated page. 404s are normal, and part of maintaining a healthy website. Don’t panic—just address them properly.
Better Ways to Handle 404 Errors
If You’ve Deleted a Page
You can fix this by re-uploading the content to the same URL. Ensure the URL returns a 200 status code to signal that the page is working properly. Once the page is live again, Google will eventually recrawl and reindex it.
If Someone Typed Up the Wrong URL
In this case, you can redirect the incorrect URL to the correct one. You can do this by setting up a 301 redirect, which tells the browser (and Google) that the page has permanently moved to a new URL. This helps users and search engines land on the correct page, even if they use the wrong link.
How to Handle 404 Pages Caused by Broken Links
Fix the broken link and then set up a redirect to the correct page, so that any existing 404 errors are directed to the appropriate content. If you’re using SiteGuru, you can easily spot broken links through the Broken Links report under the Links > Broken Links section, where you can view and fix them in one place.
If Someone’s Trying to Spot Weaknesses
If a 404 is caused by someone probing your site for security weaknesses (like trying random URLs), a 404 is exactly what you want to show. It informs the user that the page doesn’t exist and prevents exposing unnecessary information about your site’s structure or security.
Using 404 Pages to Create a More Positive User Experience
Add Convenient Links to Your 404 Pages
404 pages can be really useful for helping users find the content they are looking for, rather than just leaving the site or moving on to another one. This way, even when users encounter an error, they stay engaged and are more likely to find what they need without bouncing away from your site.
Here are some links to add to your 404 pages:
- Your homepage
- Most popular or valuable product or category pages
- Some of your most popular blog pages
- An HTML sitemap
- A way for users to report a broken link or a contact page/form
You can also add a search bar to your 404 pages to help your users find what they’re looking for.
Create a Custom 404 Page
This is vital as it allows you to inform your users that they are in the right place. Make sure the page follows your brand standards for the best experience.
Take a look at the following example from Airbnb:
Notice how it…
- Matches the brand voice.
- Includes a fun, empathetic character.
- Features a straightforward, non-overwhelming list of useful links.
Your 404 page doesn’t have to be creative. Just useful! By doing this, you'll not only make it easier for users to find the information they need, but you'll also keep them engaged with your site longer, which can ultimately boost your conversions.
404 Pages are Double-Edged Swords. Use Them Wisely!
Yes, 404 errors can be frustrating sometimes. But when used correctly, they can be valuable to your website. If you have a fun custom page, you might even make them smile.
By keeping an eye on your 404 errors in Google Search Console and Google Analytics, you'll have a clearer understanding of why users are encountering these issues and be better equipped to fix any crawl errors as they arise.