Skip to content

Releases: RoPi-LLC/no404-wordpress

Release list

v1.0.0

Choose a tag to compare

@aycanozarpaci aycanozarpaci released this 08 Sep 01:43
06d11fe

no404 – Auto 404 Redirect 1.0.0

First public release.

Turns your WordPress 404 page into a real server-side 301. When a visitor
lands on a deleted or renamed URL, the plugin asks the no404 service for the
closest matching live URL on your site and redirects there before anything is
rendered — no JavaScript, no flash of a 404 page, and search engines see a
proper redirect instead of a dead end.

Why server-side

A JavaScript snippet on a 404 template can move the browser, but the HTTP
status stays 404. Crawlers keep treating the URL as gone and the link
equity is lost. This plugin hooks into template_redirect and emits the
redirect itself, so the response is a genuine 301 (or 302 — see below).

What's in it

  • Real 301/302 redirects decided by match confidence: a manual redirect
    rule or a high-confidence catalog match (score ≥ 0.5) returns 301;
    weaker matches return 302, so a temporary guess never becomes permanent
    in search indexes.
  • Fails open. If the API is slow, unreachable or misconfigured, the plugin
    gets out of the way and WordPress serves your normal 404 page. A 1.5 s
    timeout and a short-lived circuit breaker keep a service outage from slowing
    down your site.
  • Caching built in. Resolved paths are cached as transients (default 1
    hour, configurable 60 s–7 days). This is not optional polish — it is what
    keeps a busy site inside its request quota and rate limit.
  • Runs last on purpose. The template_redirect hook is registered at
    priority 9999 so Yoast SEO, Rank Math and Redirection get to handle the
    request first. Your existing redirect rules always win.
  • Loop and open-redirect protection. Every target goes through
    wp_validate_redirect(), so a redirect can never leave your domain, and
    self-referencing targets are dropped.
  • Exclusion list. Keep paths such as /wp-json, feeds or staging routes
    out of the flow entirely.
  • Multisite aware. Each site in the network keeps its own settings and its
    own cache.
  • Clean uninstall. Removing the plugin removes its options and transients.

Settings

Found under Settings → no404:

Option Default Notes
Enabled on Master switch
API base https://no404.tr Change only for self-hosted setups
API key From your no404 dashboard
Cache TTL 3600 s Clamped to 60 s – 7 days
Timeout 1500 ms Upper bound on the API call
Force 301 off Always use 301, even for weaker matches
Excluded paths One path per line

For developers

Three filters let you override the behaviour without forking:

apply_filters( 'no404_skip_request',    bool  $skip,   string $path );
apply_filters( 'no404_redirect_status', int   $status, array  $result, string $path );
apply_filters( 'no404_redirect_target', string $target, int   $status, array $result, string $path );```
The core resolver (includes/class-no404-client.php) is plain PHP with no
WordPress dependencies, so it can be reused on other platforms.

Translations
Ships with Arabic, French, German, Hindi, Russian, Spanish and Turkish
catalogs. Source strings are English.

Requirements
WordPress 6.0 or newer
PHP 7.4 or newer
A no404 account and API key — [no404.tr](https://no404.tr/)
External service
This plugin sends the requested 404 path (and your API key) to the no404 API
at https://no404.tr/api/v1/resolve in order to look up a matching URL. No
personal data is transmitted. See the readme for the full disclosure, terms
and privacy policy.

Installation
Download no404-auto-404-redirect-1.0.0.zip below, then in WordPress go to
Plugins → Add New → Upload Plugin.