How to Find and Fix Broken Links on Your Website
A practical routine for finding broken internal and external links, deciding between a 301 redirect and a 410, and fixing them in WordPress. It ends with the habits that stop new broken links from appearing.
To fix broken links, find every link that returns an error, then do one of three things: update it to the correct URL, remove it, or redirect the missing page to its closest replacement. Internal links are fully under your control, so fix them at the source. External links can only be updated or removed. This guide covers how to find them, which status code a missing page should return, and how to stop new ones from appearing.
Key takeaways
- Fix internal links where they live, in the content, menu or template. A redirect is a safety net, not a substitute.
- Use a 301 redirect only when a genuinely relevant replacement exists. Otherwise let the old URL return 404 or 410.
- Don’t redirect every missing page to the home page. Google often treats that as a soft 404.
- Check suspicious external “broken” links in a browser first. Bot protection causes many false alarms.
- Most new broken links come from changed URLs. Add a redirect every time you rename, move or delete a page.
What counts as a broken link
A broken link is any link whose target doesn’t deliver a working page. The status code tells you what kind of break you’re dealing with.
| Response | What it means | Usual action |
|---|---|---|
| 404 Not Found | Nothing exists at that URL | Fix the link; redirect the URL if a replacement exists |
| 410 Gone | The page was removed on purpose | Remove or replace the link |
| 5xx server errors | The target server failed | Re-test later; if it persists, replace the link |
| DNS or connection failure | The domain no longer resolves or doesn’t respond | Replace or remove the link |
| SSL error | Invalid or expired certificate on the target | Link to the http version only if no secure source exists, or replace |
| 301/302 redirect | Not broken, but the link goes through an extra hop | Update the link to the final URL |
| Soft 404 | Returns 200 but shows an error or empty page | Treat it as a 404 |
Redirected links aren’t errors, but long chains waste crawl effort and slow visitors down. When you’re already editing a page, point its links straight to the final URL.
How to find broken links
On a single page: a link checker
For one page, a checker is the fastest route. Our free broken link checker tests up to 200 links on a page, internal and external, and shows the anchor text of each broken one so you can find it in your editor. Start with your home page, your top landing pages and any long resource pages with many outbound links.
Across a whole site: a crawl
Broken internal links often hide on pages nobody visits anymore. A crawler follows every internal link, then reports each broken target along with the page it was found on. Our website SEO audit crawls up to 100 pages on Pro and 250 on Agency. For bigger sites, a desktop crawler such as Screaming Frog SEO Spider handles up to 500 URLs in its free version.
In Google Search Console
Search Console shows URLs Google tried to crawl and couldn’t. Open Indexing → Pages and look at the Not found (404) row. These are often old URLs that other sites still link to, which makes them the best candidates for a redirect. Inspect a URL to see where Google discovered it, and check the Links report for top linked pages that no longer exist.
In your logs and analytics
Server logs show every 404 request, including those from visitors and bots. In analytics, filter page views by the page title of your 404 template, such as “Page not found”, to see which missing URLs real people actually hit. Fix those first.
Fixing broken internal links
Work in this order, because each step fixes more links per minute than the next:
- Templates and navigation. A broken link in the header, footer or sidebar is broken on every page. One edit fixes hundreds of instances.
- High-traffic pages. Use Search Console or analytics to find your most visited pages and fix their links next.
- Body content. Update each link to the current URL of the same content. If the content no longer exists, link to the best alternative or remove the link and adjust the sentence.
- Old URLs with backlinks or traffic. Add a redirect so outside links and bookmarks still work.
Updating the link at the source is always better than relying on a redirect. It saves visitors a hop, and your internal links send a clear signal about which URL is the main one.
301 or 410: what should a missing URL return?
When a page is gone, you choose what its old URL does. Google describes the options in its guide to redirects and Google Search.
- 301 (or 308) permanent redirect when a page with the same purpose exists: a renamed article, a moved product, a merged guide. Google treats a permanent redirect as a strong signal that the target should be shown in results.
- 404 or 410 when there’s no real replacement. Google’s page on HTTP status codes and network errors confirms that URLs returning 4xx codes are dropped from the index. A 410 says the removal was deliberate. In practice Google handles them almost the same way, so choose 410 when you can set it easily and don’t lose sleep over it.
- Not the home page. Redirecting many unrelated URLs to the home page confuses visitors, and Google may report it as a soft 404 anyway.
Here’s how both look on the two most common web servers:
# Apache (.htaccess)
Redirect 301 /old-guide/ https://example.com/new-guide/
Redirect gone /discontinued-product/
# Nginx (inside the server block)
location = /old-guide/ { return 301 https://example.com/new-guide/; }
location = /discontinued-product/ { return 410; }
After adding redirects, test a few with a redirect checker to make sure each one is a single hop to a page that returns 200. Old redirects pointing to URLs that later moved again create redirect chains, so update the original rule to the newest target.
Fixing broken external links
You can’t fix someone else’s site, so you have four choices for each dead outbound link:
- Find the new location. Search the site for the page title. Content often moves to a new URL rather than disappearing.
- Check an archived copy. The Internet Archive’s Wayback Machine shows what the page said, which helps you find an equivalent source.
- Replace the source. Link to an official or more stable page that supports the same point.
- Remove the link and rewrite the sentence if the claim no longer needs a source.
Before you remove anything, open the link in a normal browser. Many large sites return 403, 429 or unusual status codes to automated requests while working perfectly for people. Those are false positives, not broken links.
To re-test a list of URLs after you fix them, paste them into the bulk HTTP status checker, which checks up to 50 at a time.
WordPress tips
- Changing a slug. WordPress automatically redirects many changed post slugs, but don’t count on it for pages, categories or a change of permalink structure. Add the redirect yourself.
- Use a redirect manager. A plugin such as Redirection, or the redirect module built into some SEO plugins, lets you add 301 and 410 rules without editing server files and logs 404 hits so you can spot new ones.
- Moving domains or switching to https. Old absolute URLs stay in your post content. WP-CLI fixes them in one command:
wp search-replace 'http://old.example' 'https://new.example' --dry-run. Run it without--dry-runonce the preview looks right, and take a database backup first. - Deleting media. Removing an image from the media library breaks it everywhere it was used. Search your content for the filename first.
- Menus. Deleting a page doesn’t always remove custom links to it from menus. Check Appearance → Menus after cleanups.
- Scan from outside. Link-checking plugins that run on your own server can slow down shared hosting. An external checker or crawler does the same job without the load.
Preventing new broken links
- Every time you rename, move or delete a page, add a redirect or a 410 the same day.
- Keep a simple redirect map (old URL → new URL) for redesigns and migrations, and test it before launch.
- Crawl the site after each major release or template change.
- Avoid linking to unstable URLs: internal search results, session URLs, tracking parameters and staging domains.
- Schedule a monthly broken link check on your most important pages.
- Keep a helpful 404 page with search and links to key sections, and make sure it returns a real 404 status, not 200.
Check a page for broken links now
Paste any URL into our free broken link checker. It tests up to 200 links for 404, 410, 5xx, DNS errors and redirects, and lists the anchor text for each failure so you know exactly what to edit. No signup needed.
Put this into practice
Test up to 200 links on a page for 404s and dead domains.
Broken Link Checker