The fix, in one snippet
grep -rn "/old-product-page" templates/ content/
Illustrative values. Change the paths, hostnames and options to match your own site before using it.
The sections below explain what is tested, why it matters and the alternatives.
What we test
Every internal link found during the crawl is requested, and any target returning 4xx, 5xx or no response at all is reported here together with the page that linked to it. External links are not tested, because checking them means making requests to third parties on your behalf.
The crawl is bounded, so this is a sample: a clean result means no broken link was found among the pages we reached, not that none exists anywhere on the site.
Why it matters
For the reader the cost is immediate and obvious. For the crawler it is quieter: every dead link consumes part of the crawl budget allocated to your site, and a site with many of them is crawled more slowly overall, which delays discovery of the pages that do work.
Broken links also break the flow of authority through a site. A link is how a page passes value to another page; pointing it at a 404 discards that value entirely.
Most broken internal links come from content that outlived its target: a product retired, a post renamed, a section restructured. The link was correct when it was written, which is why nobody notices when it stops being so.
How to fix it
Fix the link, not the symptom. Updating the href is always better than adding a redirect, because a redirect costs a round trip on every future visit and eventually becomes a chain.
# find every place the dead URL is referenced
grep -rn "/old-product-page" templates/ content/ static/
# only if the destination genuinely moved and outside links exist
location = /old-product-page { return 301 /new-product-page; }
For content held in a database, a scheduled link check that writes to an editor's dashboard is worth more than a one-off sweep. And make sure the 404 page itself returns a 404 status: a friendly "not found" page served with 200 keeps the dead URL in the index indefinitely.
Where this fits
Broken internal links is check 1 of 7 that the seo & site health audit runs under links and site structure, ordered the way they are worth fixing. That ordering is the point: Fixing this one while the check above it still fails buys less than it looks like.
What fixing this still leaves open
Broken internal links closes one route in. Immediately below it: Internal links marked nofollow, where rel=nofollow on a link to your own page tells search engines not to pass authority through it; Orphan pages, where a page nothing links to is reachable only by knowing its address; Pages with little internal link support, where pages that almost nothing links to inherit almost no authority, however good they are.
Found in the same scan
The seo & site health audit reports this alongside checks from other categories that are at least as serious, including Crawl errors (4xx / 5xx), where uRLs reached during the crawl that returned a client or server error, and Duplicate body content, where two pages with identical body text are one page at two addresses, and search engines will pick one of them for you. A single run of seo & site health audit answers all of them at once.
The first few lines
You are a senior web engineer. I ran a security and SEO scanner against my site and it reported the finding below. Fix it properly rather than suppressing the symptom.
Finding: Broken internal links (high severity)
Scanner check id: seo-broken-links
The rest of this prompt names the pages and line numbers we found the problem on, the configuration to change, and the constraints a good answer has to respect. It is free, it just needs an account so the work is not scraped wholesale.
Sign in with GoogleSigning in is free and takes one click. We store your email address and nothing else.