Fixing Broken Links or Missing Resources (404 Errors)


What Causes 404 Errors?

Broken links occur when a page/resource is deleted, moved, or mistyped. Here’s how to fix them:

How to Find Broken Links

1. Use Google Search Console

Go to Indexing > Pages > "Excluded" tab to see URLs Google flagged as 404.

2. Crawl Your Site with Screaming Frog

Download Screaming Frog, crawl your site, and export 404 errors from the "Response Codes" tab.

How to Fix 404 Errors

1. Redirect Broken URLs

Add redirects to your .htaccess file:


Redirect 301 /old-page https://example.com/new-page
Redirect 301 /broken-image.jpg https://example.com/new-image.jpg
    

2. Restore Missing Files

Re-upload missing files (e.g., images, PDFs) via FTP or your CMS file manager.

3. Update Internal Links

Fix typos in links (e.g., /blg/post/blog/post).

4. Create a Custom 404 Page

Example 404.html:

Prevention Tips

Note: Test redirects using a tool like HTTP Status Checker to confirm they work.

Did you find this article useful?