Fix broken links and pages that return errors
Find and repair links to missing pages, restore or redirect dead URLs, and deal with server errors and unreachable pages.
The problem
Some pages return 4xx (such as 404 Not Found) or 5xx errors, cannot be reached at all, or are linked from your own pages even though they no longer exist.
How to spot it
- The audit lists affected URLs with their status code, and for broken links, the page and anchor text that link to them.
- Visitors report "page not found" when clicking menu or content links.
Why it matters
Every broken link is a dead end for a visitor who was ready to read more or buy. Search engines spend crawl effort on errors instead of real content, and repeated server errors can make them crawl the whole site less.
What happens if you leave it
Lost enquiries and sales, wasted link value, and over time a site that looks neglected to visitors and search engines.
How to fix it
- Start with server errors (5xx). They are usually a code, plugin or hosting problem. Check your server or application error log for the listed URLs and fix the cause. Contact your host if errors happen under load.
- For each 4xx URL, decide:
- The page should exist → restore it.
- The content moved → add a 301 redirect from the old URL to the closest relevant live page.
- The content is gone for good with no replacement → let it return 404 or 410, and remove links to it.
- Fix the links themselves. Use the audit's evidence ("Links to … from …") to edit each linking page so it points directly at the working URL. Do not rely on redirects for your own links.
- For broken external links, update them to the new location or remove them.
- For unreachable pages (timeouts, TLS errors), check that the URL loads from outside your network and that no firewall or bot protection blocks normal crawlers.
Platform-specific notes
- WordPress: a redirection plugin manages 301s without editing server files; update menu items under Appearance → Menus.
- Apache:
Redirect 301 /old-page/ https://www.example.com/new-page/in.htaccess. - Nginx:
location = /old-page/ { return 301 https://www.example.com/new-page/; }.
Common mistakes
- Redirecting every missing page to the homepage. Search engines treat this like a 404, and it confuses visitors.
- Using temporary (302) redirects for permanent moves.
- Returning a "not found" message with HTTP 200 (a soft 404).
How to check the fix worked
- Click each fixed link and confirm it lands on the right page without an error.
- Use your browser's network tab, or
curl -I https://www.example.com/old-page/, to confirm the status (200 for live pages, 301 for redirects). - Re-run the audit; the affected counts should fall to zero.
References and further reading
Related tutorials
Create and check your robots.txt file
robots.txt tells crawlers which parts of your site they may fetch and where your sitemap is. Here is how to pu...
Build an XML sitemap that only lists the right pages
A clean sitemap lists every page you want found: live, final and indexable. This guide covers creating one, ke...
Remove redirect chains and update links to redirected URLs
Redirect old URLs straight to their final destination in one hop, and point your own links at final URLs.