🎉 Announcing our new Equinix Sydney data centre SY5!

Tracking 404 Errors & Fixing Redirects

After a website migration or redesign, one of the most common issues that arises is the occurrence of 404 errors. These errors, indicating that a page could not be found, can have a significant negative impact on both user experience and SEO. To maintain a healthy website post-migration, it’s essential to track 404 errors and fix redirects promptly. This ensures that users and search engines can easily navigate your site and access the correct content.


Why Tracking 404 Errors & Fixing Redirects is Important

Both 404 errors and broken links can severely affect your website’s performance. Here's why it’s essential to track them and implement proper redirects:

  • User Experience: Encountering a 404 error can frustrate users, leading them to abandon your site and potentially causing them to seek out a competitor.

  • SEO Implications: If search engines like Google encounter 404 errors, they may interpret your website as poorly maintained, which could negatively affect your rankings. Search engines prefer sites that are well-structured and free from dead links.

  • Preserving Link Equity: When users or search engines attempt to access a page that no longer exists, your backlinks and internal links to those pages lose their value. Proper redirects help preserve link equity and traffic.

  • Site Crawl Efficiency: Fixing 404 errors and setting up redirects ensures that search engine bots don’t waste time crawling dead links, allowing them to focus on your high-priority pages.


Tracking 404 Errors

To maintain a healthy site after migration, it’s crucial to regularly track 404 errors. These errors can stem from several factors, including URL changes, deleted pages, or broken internal links during a redesign or migration process.

How to Track 404 Errors

  1. Google Search Console:

    • Google Search Console (GSC) is one of the best tools to monitor 404 errors. Once your site is verified in GSC, you can go to the Coverage report to identify crawl errors, including 404s.

    • The Crawl Errors section will show any URLs that Googlebot couldn’t access, and you can click on these errors to see the pages where they’re occurring.

    • GSC also lets you see any pages that are returning soft 404 errors, which occur when a page doesn't exist but doesn't return the proper 404 status code.

  2. Website Analytics:

    • Platforms like Google Analytics can also help identify 404 errors by tracking the pages that users land on. If a user tries to access a non-existent page, Google Analytics can record the event, and you can examine the flow of users to identify common 404 occurrences.

    • Set up event tracking to log 404 errors by creating an event that fires every time a user lands on a page that returns a 404 error.

  3. Third-Party Tools:

    • Screaming Frog is a popular website crawler that can detect 404 errors on your website. You can run a crawl to identify any broken links or missing pages, which helps in finding areas that need attention.

    • Ahrefs and SEMrush also provide site audit tools that can detect 404 errors and offer recommendations for fixing them.

  4. Server Logs:

    • You can analyze your website’s server logs to track 404 errors. The logs will provide detailed information on which URLs return 404 errors, the date and time of the error, and the user-agent that triggered the error.

    • This method can be more technical but allows you to track issues over time and resolve them efficiently.


Fixing Redirects (301 vs. 302)

Once you’ve identified 404 errors, the next step is to implement proper redirects to resolve them. Redirects help ensure that users and search engines are directed to the correct pages instead of encountering a 404 error.

Types of Redirects

  1. 301 Redirect (Permanent):

    • A 301 redirect tells search engines and browsers that the page has been permanently moved to a new URL. This type of redirect is the most common and is crucial for preserving SEO value from old pages to new ones.

    • It transfers nearly all of the original page’s link equity (backlink value) to the new page, which helps maintain your site’s rankings and authority.

    • When to use: When a page has permanently moved or no longer exists and you want to transfer its link equity and traffic to a new URL.

  2. 302 Redirect (Temporary):

    • A 302 redirect signals that the page has been temporarily moved. Unlike a 301 redirect, a 302 redirect doesn’t pass the full link equity, meaning search engines won’t treat the new page as the permanent destination.

    • When to use: When the page has temporarily moved (for instance, during maintenance or a seasonal promotion) and you intend to restore the original URL in the future.

Implementing Redirects

  • Use a .htaccess File (for Apache Servers):

    • You can implement 301 or 302 redirects in the .htaccess file if you’re using an Apache server. This method is typically used for redirecting URL paths across the entire website or for specific pages.

    • Example for 301 redirect:

      Redirect 301 /old-page.html http://www.example.com/new-page.html
    • Ensure to test redirects to verify they work as expected. A common mistake is forgetting to include the proper HTTP or HTTPS in the destination URL.

  • Use Redirect Plugins (for WordPress users):

    • If you use WordPress, there are several plugins (such as Redirection or Yoast SEO) that make it easy to set up redirects without needing to manually edit server files.

    • These plugins allow you to quickly map old URLs to new ones, track 404 errors, and create redirects directly through the WordPress dashboard.

  • Use Server-Side Redirects:

    • On some hosting platforms, such as Nginx, you’ll need to edit server configuration files to implement redirects.

    • Example for 301 redirect in Nginx:

      server {
          location /old-page {
              return 301 http://www.example.com/new-page;
          }
      }

Best Practices for Fixing Redirects

  • Avoid Redirect Chains: A redirect chain happens when one page redirects to another, which in turn redirects to another. This can slow down page load times and negatively affect SEO. Always aim to have a direct 301 redirect from the old page to the new page.

  • Don’t Redirect to Irrelevant Pages: Ensure that each redirect points to the most relevant page possible. Redirecting old content to the homepage or an unrelated page can confuse both users and search engines.

  • Check for Redirect Loops: A redirect loop occurs when a page redirects back to itself or into a cycle of redirects. This can result in an infinite loop, causing browsers to display an error. Regularly check for and resolve any redirect loops.

  • Keep Your Redirects Up to Date: After migration, it’s important to periodically review your redirects and ensure they still lead to the correct pages. Over time, you might need to adjust or remove redirects as your site’s content evolves.


Tools to Help Track and Fix Redirects

  • Google Search Console: The Coverage report can show pages that have 404 errors, making it easy to identify missing pages that require redirects.

  • Screaming Frog: This tool crawls your site and highlights any redirect chains, loops, or broken links. It’s an excellent tool for identifying redirect issues post-migration.

  • Ahrefs: The Site Audit feature in Ahrefs detects broken links, redirects, and crawl errors, helping you maintain a healthy site.

Last updated

Was this helpful?