Replace Broken Links With AI
Finds links in your posts that return 404 or 410, waits until they're truly dead, then has AI search Google and swap each one for the best live page on the same topic. Works with ChatGPT or Claude, with an approval mode and one-click undo.
Screenshots
Replace Broken Links With AI fixes dead links instead of just reporting them. When a page you linked to disappears, the plugin works out what that page was about, has an AI write a Google search for it, reads the top 10 results, and lets the AI pick the live page that best matches what your link promised. The new page is checked, then the link is swapped. Your reader lands on a working page that covers the same thing, and your post keeps a useful outbound link instead of a 404.
It's careful about what counts as dead. Only pages that answer 404 Not Found or 410 Gone count, twice in a row, to a request that looks like an ordinary browser, and you choose how long a link has to keep failing first: right away, a day, three days, a week, two weeks or a month. Timeouts, server errors and sites that block bots never count. It also catches the dead links other checkers miss: expired domains that now show a parked or for-sale page, redirect to someone else's homepage or have been taken over by spam.
Each lookup starts with the Wayback Machine's last good copy of the old page, searches the original website first in case the page just moved, and matches links to your own site against your own posts without using Google at all. Replacements go in automatically when the AI is confident, or wait for your approval; every change saves a revision and can be undone. You bring an OpenAI or Anthropic key and a Serper.dev key, choose the models, edit both prompts if you like, and set daily limits on lookups and spending. Find it under Content Powered > Replace Broken Links.
Features
- Only truly dead links. 404 Not Found and 410 Gone only, twice in a row, from a request that looks like a browser. Timeouts, server errors and bot blocks never count.
- A waiting period you choose. Right away, 24 hours, 3, 7, 14 or 30 days. A link is checked again when the wait is over, and once more right before it's swapped.
- Dead domains that still load. Parked and for-sale pages, redirects to another site's homepage, spam takeovers and domains with no DNS are flagged for your review.
- Knows what the page was. The Wayback Machine's last good copy gives the old page's title and opening text, so the search looks for the right thing.
- AI-written Google searches. A low-cost model writes the search, and Serper.dev returns Google's top 10 results. The original site is searched first, in case the page just moved.
- AI picks the best match. A stronger model chooses the result that fits the link text and the sentence around it, with a confidence level and a reason.
- Verified before it's used. The new page has to load, can't be noindexed or parked, and is linked at its final address so it never adds a redirect.
- Your own posts for your own links. A dead link to your own site is matched against your published posts and pages, with no Google search and no search cost.
- ChatGPT or Claude. Pick OpenAI or Anthropic, choose a model for each step, and edit both prompts with placeholders and a test lookup.
- Automatic or approved. Confident matches go in by themselves, the rest wait for you. Pick another result or paste your own link at any time.
- Change log and undo. Only the link address changes; link text, rel and target stay. Every swap saves a revision and can be undone in one click.
- Cost controls. One lookup per dead URL however many posts use it, preferred and blocked domains, and daily limits on lookups and spending.
- Click Download above to save
replace-broken-links-ai.zip. Leave it zipped. - In your WordPress dashboard, go to Plugins > Add New Plugin and click Upload Plugin.
- Choose the ZIP and click Install Now, then Activate Plugin.
To update later, upload a newer ZIP the same way. WordPress offers to replace the installed version and keeps your settings.
Which Links Count as Broken?
Only pages that answer 404 Not Found or 410 Gone to two requests in a row, made the way an ordinary browser would. A site that's down for a few minutes, a timeout, a server error or a page that blocks bots is never treated as broken. Links whose domain has changed hands, such as a parked page or a spam site on an old domain, are flagged separately and always wait for your approval.
Will It Replace a Link Before It's Really Dead?
No. You choose how long a link has to keep failing, from right away up to 30 days, and it's checked again at the end of that wait and once more right before it's swapped. If the page comes back at any point, it drops off the list.
What API Keys Do I Need?
An OpenAI or Anthropic API key for the AI, and a Serper.dev key for the Google results. You pay those services directly and only for what you use. Keys are stored encrypted, or you can put them in wp-config.php.
How Much Does Each Replacement Cost?
Each dead link uses two short AI requests and one or two searches, which is usually a few cents at most with the default models and a fraction of a cent with the cheapest ones. The Overview shows an estimate, and you can set daily limits on lookups and spending.
Can the AI Put a Bad Link in My Posts?
It can only choose one of the search results, by its number, so it can't invent an address. The chosen page is checked before it's used, domains you never want to link to are removed first, and anything the AI isn't sure about waits for your approval.
Can I Undo a Replacement?
Yes. Every change is listed with who made it, and Undo puts the old link back. Each change also saves a revision of the post, and the post's last-modified date doesn't move.
Does It Work With Page Builders?
It checks the content saved by the block editor and the classic editor. Page builders that store their layouts separately, such as Elementor or Divi, aren't scanned.
Does It Slow Down My Site?
No. Nothing runs for visitors: links are checked in short background batches, each URL once per scan however many posts use it, and lookups run a few at a time.
1.0.1
- Wayback Machine lookups use the CDX API first (one request lists the last good copies before the link died), with the availability API as a fallback, so archive.org rate limits matter less.
- Archived summaries no longer repeat a description that's the first paragraph cut short.
- The "Used in" column is left-aligned again (it shared a class name with a core column).
1.0.0
- First release.
- See https://github.com/jmsprsns/replace-broken-links-ai/releases for the full release history.
Download
More Free WordPress Plugins
Honest Last Modified Date
Only changes a post's "Last modified" date when enough of it has really changed: a minimum number of words, a percentage, or both, set separately for posts and pages.Reading Time
Shows an accurate "5 min read" on your posts, added automatically or with a block, shortcode or PHP, with per-post control and an optional reading progress bar.Blog Post to Audio Podcast
Turns your blog posts into natural-sounding audio with ElevenLabs, adds a lightweight, accessible player to each post, and publishes your blog as a podcast for Apple Podcasts and Spotify.Let's Grow Your Business
Want some free consulting? Let's hop on a call and talk about what we can do to help.
