Skip to content

Guides

How to fix 404 Not Found errors and broken links

Website errorsUpdated 29 October 20263 min read

Short answer: a 404 means the address doesn't match any page. Find the broken links with Google Search Console or a link checker. Then fix the link, restore the page, or add a 301 redirect to the closest matching page. Leave real dead ends as 404s, and give them a helpful 404 page.

Why 404 errors happen

How to find them

  1. Google Search Console → Pages → Not found (404). Shows addresses Google tried and failed to load.
  2. A crawler or link checker. It follows every link on your site and lists the broken ones.
  3. Your server logs or analytics. Look for the most visited 404 addresses, and fix those first.

Fix, redirect or leave it?

SituationWhat to do
Your own link has a typoFix the link
The page movedAdd a 301 redirect from the old address to the new one
The page was removed and a close replacement exists301 redirect to the replacement
The page was removed and nothing is similarLeave it as 404 (or 410 Gone)
Random addresses from botsIgnore them

Don't send every missing page to the home page. Search engines treat that as a "soft 404", and visitors find it confusing.

How to add a 301 redirect

On Apache or LiteSpeed hosting, add a line to .htaccess:

Redirect 301 /old-page /new-page

In WordPress, a redirect plugin does the same without editing files. On Nginx:

location = /old-page { return 301 /new-page; }

On Next.js and similar frameworks, use the redirects setting in the framework's config, or your host's redirect rules.

Test the redirect in a private window. Keep the chain short: old → new, never old → older → new.

Make a helpful 404 page

A good 404 page:

Prevent new 404s

Questions

Do 404 errors hurt my rankings?

404s on pages that never mattered don't hurt your site as a whole. What you lose is the traffic and links that pointed at a page that used to work. Redirect those.

What's the difference between 404 and 410?

404 means "not found". 410 means "gone for good". Both remove the page from search results over time. 410 is a slightly stronger signal.

Why does my page work for me but show 404 for others?

Usually caching, a typo in a shared link, or capital letters in the address. Open the exact link in a private window to check.