The Internal Link Auditor finds broken and redirect-chained URLs. That's half the job. The other half is shipping a fix that covers all four places a URL reference lives:
- The web server's redirect config
- The source HTML that contains
<a href>/ canonical / JSON-LD references - The sitemap.xml that still lists the dead URL
- The external indexers (Google, Bing, Yandex) still serving the old URL in results
If you only fix #1, your own users and crawlers hit an extra hop on every internal click. If you only fix #2, external backlinks still break. If you only fix #3, the sitemap-to-live-site delta looks good but the old URLs still rank. If you only fix #4, you chase indexers without giving them a redirect to follow.
The Broken Link Fix Generator emits everything needed for all four fixes from one URL-map input.
What it emits
From a single old | new URL map, the tool produces:
- Netlify
_redirectsand Cloudflare Pages_redirects, both use the same syntax Netlify pioneered; the!flag overrides any lingering static file. - Cloudflare Workers, an edge-compute JS handler, faster than static
_redirectsfor already-cached traffic. Deploy withwrangler deploy. - Vercel
vercel.json, JSON redirect array that merges cleanly into existing config. - AWS CloudFront Functions, a viewer-request handler (cheaper than Lambda@Edge for simple redirects). Attach to your CloudFront distribution.
- DigitalOcean App Platform —
app.yamlingress rules for the static-site component. Apply viadoctl apps update. - Apache
.htaccess—RewriteRuleblocks with per-status-code flags (R=301, R=302, R=308, or[G,L]for 410-gone). - nginx
locationblocks, one per URL, drop inside yourserver { }block. - Caddy
redirdirective, native Caddy syntax withpermanent/temporarystatus codes, works with automatic HTTPS. See the Caddy server writeup for the full stack context. - sed patch, shell script that walks
src/**/*.html,*.md,*.njkand rewrites every occurrence of the old URL to the new one. - IndexNow JSON body, ready to POST to
https://api.indexnow.org/indexnowso Bing, Yandex, and other IndexNow participants recrawl within minutes.
The same URL map drives every output. Ship whichever matches your stack plus the sed patch plus the IndexNow POST, all three at once.
Why the sed patch matters
A redirect is a band-aid. Every internal click to an old URL burns a server request, adds 100-300ms latency, and counts toward Google's "excessive redirect" threshold when aggregated across a site with hundreds of moved URLs.
The sed patch eliminates the hop for your own traffic by rewriting every in-HTML reference. After you run it, only external backlinks still trigger the redirect. Internal traffic goes straight to the new URL.
Three places the sed patch catches that manual fixes often miss:
<link rel="canonical" href="...">, a stale canonical tells Google "the old URL is the real one," undoing the redirect's signal- JSON-LD
urland@idfields, structured data still claiming the old URL as the page's identity <sitemap><loc>entries in custom sitemap generators that read from a source file instead of a database
The four status codes
The tool lets you pick the redirect's status code because the choice matters:
- 301 (moved permanently), the normal case. Tells search engines "transfer all signals to the new URL." Browsers cache aggressively; if you ever want to un-redirect the URL, you'll need to blow out the browser cache manually.
- 302 (found / temporary), for A/B tests and truly temporary moves. Does NOT transfer ranking signals.
- 308 (permanent, preserve method), like 301 but preserves the HTTP method (POST stays POST). Use for API endpoints; overkill for most HTML pages.
- 410 (gone), the URL is deliberately dead. Better than 404 when you know the page won't come back, because GSC de-indexes 410'd URLs within 24-48 hours vs several weeks for 404s. The generator emits
- 410for Netlify and[G,L]for Apache.
If in doubt, ship 301 unless you're killing a URL permanently with no replacement, then ship 410.
The IndexNow win
Bing's IndexNow protocol is underused. Most sites do not implement it because most sites do not think about Bing. Bing has 8-15% market share in the US (higher in some verticals) and is the data source Google uses to train some features. Leaving Bing un-indexed leaves real traffic on the table.
IndexNow is a trivial POST. The generator builds the full payload: every old URL (to signal "please recrawl") plus every new URL (to signal "please discover"). Paste the payload, POST it, and Bing starts recrawling within minutes instead of waiting for its next sitemap poll.
Google does not currently participate in IndexNow. For GSC you still regenerate the sitemap and resubmit via Search Console.
The deployment order
The tool emits a 5-step "Ship order" checklist with the outputs. Summarized:
- Commit the redirect config (Netlify / Apache / nginx / Vercel) and deploy. This makes the redirect live.
- Run the sed patch against
src/. Eliminates internal redirect hops.git diffto verify before committing. - Regenerate sitemap.xml. Remove 410'd URLs; replace 301 sources with their targets. Run Index Coverage Delta to confirm the sitemap is aligned.
- Submit sitemap to GSC + Bing. POST IndexNow payload to
api.indexnow.org. - Re-audit in 7 days. Any remaining 301 = sed missed a reference OR the link is JS-constructed. Patch and redeploy.
Skipping any step leaves a visible symptom. Skip step 2 and your own users hit redirect chains. Skip step 3 and GSC flags "Submitted URL not found (404)." Skip step 4 and Bing keeps serving the dead URL in results for weeks. Skip step 5 and you think you're done when you're not.
The paired audit
This generator is designed to consume the CSV output of the Internal Link Auditor. Run the audit, export the broken + redirected URLs, paste into the generator, ship the fix bundle. The full round-trip takes about 10 minutes on a site with 50-100 broken links.
If you're not sure which old URL maps to which new URL (moved content without a clear successor), the tool accepts a single URL per line and treats it as a 410. Kill the URL cleanly rather than redirecting it to a vaguely-related page, soft 404s hurt more than honest 410s.
Related reading
- The Mega Analyzer, now cross-links every check to its fix tool, including 404/broken-link
- Sitemap Delta: Finding URLs Your Site Links To That Are Not in Your Sitemap, concept
- Index Coverage Delta, The Diff Between What GSC Sees and What You Publish
- Hosting & Indexing Health Checks: Fix GSC Errors Fast
If you run an agency or client portfolio where URL sprawl is a constant background cost, the $20 Dollar Agency walks through the migration SOP: The $20 Dollar Agency.
Fact-check notes and sources
- IndexNow protocol specification and supported search engines: indexnow.org (accessed 2026-04-20)
- Netlify
_redirectssyntax and!force flag: docs.netlify.com/routing/redirects/ - Apache
mod_rewriteRewriteRule flags: httpd.apache.org/docs/current/mod/mod_rewrite.html - HTTP 410 vs 404 semantics and Google's handling: Google Search Central, Reduce the Googlebot crawl rate
- Vercel
redirectsconfig: vercel.com/docs/projects/project-configuration