Newwebs Techs logo Newwebs TechsBuilding websites, explained for beginners
Maintenance and Security

How to Find and Fix Broken Links on Your Website

A reader emails to say the "pricing" link in your footer goes nowhere. You click it, and there it is: a bare 404 page you did not even know existed. Then the uncomfortable question arrives.

A website crawl report listing broken links with 404 status codes highlighted in red

A reader emails to say the "pricing" link in your footer goes nowhere. You click it, and there it is: a bare 404 page you did not even know existed. Then the uncomfortable question arrives. If that link was broken, how many others are, and for how long have visitors been hitting them without telling you?

Broken links rarely come from one big mistake. They pile up quietly, a renamed page here, a deleted blog post there, a partner site that changed its address two years ago. The fix is not hard, but most site owners go about it in the wrong order: they hunt links one by one in the editor, instead of letting a crawler find them all and then deciding what each one deserves.

When I audit small sites, nearly every dead link falls into one of four groups, and knowing the group tells you the fix.

  • Renamed pages. You changed a slug from /services to /what-we-do because it sounded friendlier. Every menu item, old blog post and outside site pointing at the old address now fails.
  • Deleted content. An old offer, a staff profile, a product you stopped selling.
  • Typos in hand-written links. A missing letter, a stray space, http pasted where the page only answers on https and has no redirect.
  • Outbound rot. Pages on other websites that moved or vanished. You cannot repair those; you can only replace or remove your link.

The first group is by far the most common on sites built with a CMS, because changing a slug takes one click and nothing warns you about the consequences. If you have recently gone through a redesign, start there.

Finding them without clicking every page

Manual checking works for a five page site. Past that, use a tool that follows every link the way a search engine would and reports the ones that fail.

A desktop crawler

Screaming Frog SEO Spider is the one most people end up with. The free version crawls up to 500 URLs, which covers the majority of small business sites and personal blogs. Paste your homepage address, let it run, then open the Response Codes tab and filter by "Client Error (4xx)". For each broken URL, the lower panel shows the Inlinks: every page that links to it, with the anchor text. That second view is the useful one, because it tells you exactly where to go and edit.

If you prefer something without an install, the W3C Link Checker runs in the browser. It is slower and plainer, and it checks one page at a time unless you tell it to recurse, but it costs nothing and never asks for an account.

Search Console

Google Search Console shows a different slice of the problem. Under Pages, the "Not found (404)" group lists addresses Google tried to fetch and could not. Some of these come from links on other websites rather than your own, which is the one thing a crawler of your site will never find. Expect noise here: old URLs from years ago, malformed addresses scraped by spam sites. You do not need to fix every one, only the ones that look like real pages people might want.

A browser extension for spot checks

For a single long page, an extension such as Check My Links highlights every link in green or red in a few seconds. I keep one installed for checking new articles before they go live.

The common advice that makes things worse

You will often read that every 404 should be redirected to the homepage. It feels tidy: no visitor ever sees an error page again.

In practice, it is one of the worst habits a site can pick up. A person who clicked a link about your refund policy and lands on the homepage has no idea what happened. They assume the page was never there, and often leave. Search engines treat a wave of unrelated redirects to the homepage as what Google calls a soft 404, so you do not even get the ranking benefit people hope for.

Redirect a dead URL only when a page exists that answers the same question. Otherwise, let it return a 404 and make the 404 page helpful.

A good 404 page has a short sentence admitting the page is missing, a search box, and three or four links to the sections people most often want. That costs an hour once and saves visitors for years.

Once the crawler gives you a list, sort each broken link into one of three actions. This is the part people skip, and it is what keeps the job from turning into a weekend.

SituationFixWhere you do it
Your page moved to a new addressAdd a 301 redirect from old to new, then update internal links to point straight at the new URLServer config, host dashboard, or a redirect plugin
Your page was deleted, and a close replacement exists301 redirect to the replacementSame as above
Your page was deleted, nothing replaces itRemove or rewrite the internal links; leave the URL returning 404Page editor
Typo in a linkCorrect the link; no redirect neededPage editor
Outside page is goneLink to a current source or remove the linkPage editor

On Apache hosting, a single line in the .htaccess file handles a moved page: Redirect 301 /services /what-we-do. On WordPress, the free Redirection plugin does the same through a form, and it also logs fresh 404s so you see new breakage as it happens. Netlify and Cloudflare Pages read a plain _redirects file with one rule per line.

Do not stop at the redirect. Update your own links to the new address too. Redirects work, but each one adds a round trip for the browser, and chains of two or three redirects slow pages down and occasionally break when one hop is removed later.

Keeping it from coming back

Broken links are a maintenance problem, not a one-time cleanup, which is part of why a website is never really finished. Two habits do most of the work. First, whenever you change a slug, add the redirect in the same sitting, before you forget the old address. Second, put a crawl on your calendar. For a site that changes weekly, once a month is enough; for a brochure site, once a quarter, at the same time you update plugins and check backups.

If you already keep a routine for keeping your website secure and up to date, add a single line to it: "run link check, fix 4xx". It takes ten to twenty minutes on most small sites once the backlog is gone.

What to do this week

Run one crawl of your whole site with the free Screaming Frog tier or the W3C checker, and export only the 4xx list. Do not fix anything yet. Sort each row into redirect, remove or correct using the table above, then work through the redirects first, because those are the pages people and search engines are still trying to reach. Most small sites I have seen finish the first pass in an afternoon.

AH
Astrid Holm

Astrid writes about designing and looking after websites, focused on clarity, usability, and sensible upkeep.

More posts by Astrid

More in Maintenance and Security

wave pattern for Why a Website Is Never Really Finished Maintenance and Security

Why a Website Is Never Really Finished

Beginners often think of a website as a project with an end: you build it, launch it, and you are done.

Felix NkemeluSep 30, 20264 min read
01doorganico 084goad 3hot8 4465456 after5internprogram ahandfulofblessings ahmadpc ahomcybersecurity allodialresources annodex antiquesandperiodcollectibles aotc asianworldkashmir beedlectrics bloggertemplatefree bluefeatheragency bodyweightsolution campaign08blog carfixadvisor catstreetcollective cbstvsports cnfanspurchasing committeeof500yearsofdignityandresistance covertopsdjs cs-kaiyuangame cuestacomunicaciontotal cxoutlet dancebetgame deskgearhub destinyvillastay detectmagazine di33 diamondsteelbuildings donmo dyanadropship emarsysfinance emimattl escapechan eskitarih evautoplay everythingweddings-orlando farmzone feedviewerapp foxstudiosscratch gamevui123 gleasongrade greetingsday hacklabasu haskell iw-kaiyun jagoanproperti jilidskripsi joltbusinessfinance juegodepokergratis juegospucca kaeru-festival latestmehndidesigns lestanzediottaviano litemagazines localcommunityhero lustrsazan mariashebets menswheels nikkit ootheday oxigenvpn plurfitness prefetial probudgetcarpetcleaning psychicmrsmartin pyaten qvantor rejoignezlogis rexzbot riselayouts ruchin rwxqsgd5 sakaltime shibiaowang shop-bot skrtips strcoding tetapatrium topselller uneplanteartificielle vipertechcr webtech1223411 wo-kygaming yamaha-mekar yeknava yoybuysheets zenunwa yamaha-mekar jilidskripsi ankertoto ankertoto ankertoto ankertoto