Skip to content
yairixStudioPublic

About

Free open-source WordPress plugin that turns 404 error pages into AI-generated landing pages. Bring your own key: OpenAI, Anthropic Claude, Google Gemini, or self-hosted LLMs (Ollama, LM Studio). Smart 301 redirects, WooCommerce product recovery, built-in rate limiting, zero telemetry.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

404Fix — AI-Powered 404 Pages for WordPress (Free & Open Source)

Turn every "Page Not Found" error into a smart, converting landing page. 404Fix is a free, open-source WordPress plugin that uses AI — OpenAI (ChatGPT), Anthropic Claude, Google Gemini, or any self-hosted LLM — to instantly generate helpful, on-brand content for broken URLs, recover lost visitors, fix dead links with smart 301 redirects, and showcase your WooCommerce products where you'd otherwise lose the sale.

License: GPL v2 WordPress 6.0+ PHP 8.0+ Bring Your Own Key No Telemetry

100% self-contained. No SaaS backend, no subscription, no license keys, no telemetry, no upsells. Your server talks directly to the AI provider you choose — and to nothing else.


Why 404Fix?

Every website accumulates broken links: deleted products, renamed posts, mistyped URLs, stale backlinks, old campaign links. Each one is a visitor about to bounce and a ranking signal wasted.

404Fix recovers that traffic in three layers:

  1. Smart fuzzy redirect — if the broken URL is a near-miss of a real page (/contcat → /contact), 404Fix serves an instant 301 redirect. Good for visitors, great for SEO.
  2. AI-generated landing page — for URLs with intent (/best-espresso-machines), the AI writes a helpful, on-brand page in your language and tone, weaving in your actual products, posts, and pages — complete with titles, meta description, and calls to action.
  3. Curated suggestions page — a clean fallback listing your most relevant content, so no visitor ever hits a dead end.

You control the order and behavior of every layer.

Features

Feature
🤖 AI content generation for 404 URLs — titles, subtitles, rich HTML body, SEO meta description
🔑 Bring Your Own Key (BYOK) — OpenAI, Anthropic Claude, Google Gemini, or any OpenAI-compatible endpoint
🏠 Self-hosted LLM support — Ollama, LM Studio, OpenRouter, vLLM, LocalAI via custom base URL
🎭 Two display modes — honest "error page" mode or stealth mode that renders a real content page
↪️ Fuzzy-match 301 redirects — auto-fix typo'd URLs to the closest real page
🔀 Redirect manager — manual 301 redirects with hit tracking and CSV export
🛒 WooCommerce integration — feature relevant products with price and add-to-cart on generated pages
📌 Content priorities — mark products/posts/pages as "must show" or let the AI decide
🛡️ URL guard — blocks abusive, malicious, and gibberish URLs before any AI call
🎯 AI relevance check — optionally reject off-topic URLs (fail-open, low token cost)
⏱️ Built-in rate limiting — per-IP minute/hour/day windows, temporary blocks, site-wide daily cap
🔐 Encrypted key storage — libsodium secretbox (AES-256-GCM fallback); the key never reaches the browser
📈 Local usage stats — daily requests and token counts stored in your database only
🧭 SEO safety — generated pages are noindex until you approve them; sitemap exclusion included
🌍 Multilingual generation — English, Spanish, French, German, Russian, Arabic, Hebrew — with RTL support
🧩 Theme-friendly — renders inside your active theme (tested with Astra); no iframe, no external assets
🧹 Clean uninstall — removes every option, table, transient, and generated page it ever created

How It Works

Visitor hits missing URL
        │
        ▼
┌─ URL Guard ─────────────┐   abusive / gibberish → standard 404 (no AI call)
└─────────┬───────────────┘
          ▼
┌─ Fuzzy Matcher ─────────┐   close match found → 301 redirect
└─────────┬───────────────┘
          ▼
┌─ Rate Limiter ──────────┐   over limit → graceful fallback
└─────────┬───────────────┘
          ▼
┌─ AI Engine (your key) ──┐   builds a context-rich prompt from the URL,
│  OpenAI / Claude /      │   your site description, tone, language, and
│  Gemini / self-hosted   │   selected content → returns structured JSON
└─────────┬───────────────┘
          ▼
   Cached as a custom post type — the next visitor gets it instantly,
   with zero additional AI cost.

Supported AI Providers

Provider Default model Notes
OpenAI gpt-4o-mini Any chat model; JSON mode
Anthropic Claude claude-haiku-4-5 Fast and cost-effective
Google Gemini gemini-2.5-flash Native JSON output
Custom / self-hosted your choice Any OpenAI-compatible API: Ollama, LM Studio, OpenRouter, vLLM, LocalAI

Model is configurable per provider — use a cheaper model for volume or a stronger one for quality.

Requirements

  • WordPress 6.0 or newer
  • PHP 8.0 or newer
  • An API key for your chosen AI provider (or a local LLM server)

Installation

  1. Download the latest release (or clone this repository).
  2. Copy the 404fix/ directory into wp-content/plugins/.
  3. Activate 404Fix on the WordPress Plugins screen.
  4. The onboarding wizard walks you through: pick a provider → paste & test your API key → describe your site (or let AI Site Scan write the description for you) → select content to feature → choose a display mode. Done in under two minutes.

Privacy & Security

  • Zero telemetry. The plugin never reports anything to anyone. There is no "home" to phone.
  • Your key stays yours. Stored encrypted (libsodium secretbox, AES-256-GCM fallback) in your own database; never exposed to the browser, never logged, shown only as a mask in the admin.
  • One external endpoint. The only outbound HTTP calls go to the AI provider you configured. Cover images are generated locally as SVG — no third-party image CDN.
  • Hardened surface. Nonces and capability checks on every admin action, sanitized inputs, escaped outputs, wp_kses_post on all AI HTML, hashed IPs in the rate limiter, validated custom base URLs.
  • Clean uninstall removes all data, including the encrypted key.

Frequently Asked Questions

Is 404Fix really free? Yes — GPL-2.0, no premium tier, no locked features, no license server. You only pay your AI provider for the tokens you use (a typical 404 page costs a fraction of a cent, and every page is cached after the first generation).

Does it slow down my site? No. Regular pages are untouched. On a 404, the visitor immediately gets a fast skeleton page and the content streams in asynchronously. Once generated, pages are served from cache like any WordPress post.

Can it run fully offline / air-gapped? Yes — point the custom provider at a local LLM server (e.g. Ollama on http://localhost:11434/v1) and no request ever leaves your infrastructure.

Will AI pages hurt my SEO? Generated pages are noindex by default and excluded from sitemaps until you explicitly approve them. Fuzzy 301 redirects, proper status codes, and meta descriptions are handled for you.

Does it work with WooCommerce? Yes — selected products appear on generated pages with image, price, and an add-to-cart button, and the AI is told about them so it can weave them into the copy.

What about abusive bots hammering random URLs? A pattern-based URL guard rejects malicious and gibberish URLs before any AI call, and the built-in per-IP + site-wide rate limiter caps your spend. Both are configurable.

Which languages are supported? Content generation and frontend strings ship in English, Spanish, French, German, Russian, Arabic, and Hebrew (RTL supported). The admin interface is fully translatable (text domain 404fix).

For Developers

The dev/ folder spins up a complete test site (WordPress + MySQL + WP-CLI + a mock OpenAI-compatible server) so you can develop and test without spending API tokens.

Contributing

Contributions are welcome — bug reports, translations, provider integrations, docs. See CONTRIBUTING.md.

Support

License

GPL-2.0-or-later. Free as in freedom — fork it, ship it, improve it.


Keywords: WordPress 404 plugin, AI 404 page generator, custom 404 page WordPress, broken link fixer, 404 redirect plugin, smart 404, ChatGPT WordPress plugin, Claude WordPress plugin, Gemini WordPress plugin, self-hosted AI WordPress, Ollama WordPress, 301 redirect manager, WooCommerce 404 recovery, page not found SEO, open source WordPress AI plugin.

About

Free open-source WordPress plugin that turns 404 error pages into AI-generated landing pages. Bring your own key: OpenAI, Anthropic Claude, Google Gemini, or self-hosted LLMs (Ollama, LM Studio). Smart 301 redirects, WooCommerce product recovery, built-in rate limiting, zero telemetry.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages