PHPackages                             dolphiq/redirect - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. dolphiq/redirect

AbandonedCraft-plugin[Utility &amp; Helpers](/categories/utility)

dolphiq/redirect
================

Craft redirect plugin provides an easy way to enter and maintain 301 and 302 redirects and 404 error pages.

5.1.1(2w ago)54293.6k↓62.2%34[27 issues](https://github.com/Dolphiq/craft-plugin-redirect/issues)MITPHPPHP ^8.2

Since Jun 2Pushed 2w ago2 watchersCompare

[ Source](https://github.com/Dolphiq/craft-plugin-redirect)[ Packagist](https://packagist.org/packages/dolphiq/redirect)[ RSS](/packages/dolphiq-redirect/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (8)Versions (41)Used By (0)

Redirect Manager for Craft CMS
==============================

[](#redirect-manager-for-craft-cms)

 Create and manage **301** and **302** redirects, catch every **404**, and turn missed URLs into redirects with a single click — straight from the Craft control panel.

 [![Latest version](https://camo.githubusercontent.com/6de7edca67fa732890cbffd4a4c9d4f71b8f6463334732ce8d33ddb5e24eead5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f646f6c706869712f72656469726563742e7376673f6c6162656c3d76657273696f6e)](https://packagist.org/packages/dolphiq/redirect) [![Craft CMS 5](https://camo.githubusercontent.com/fd9919b87607a22e2f12aed4391ef68503f642a4616d0a4c8ce019de4ee68de6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4372616674253230434d532d352e782d4535343232422e737667)](https://camo.githubusercontent.com/fd9919b87607a22e2f12aed4391ef68503f642a4616d0a4c8ce019de4ee68de6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4372616674253230434d532d352e782d4535343232422e737667) [![PHP 8.2+](https://camo.githubusercontent.com/c2588b5670f2c910b8cc849ace22a22efda8956b7c2f797d11d2096bbfc7b1f5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322532422d3737374242342e737667)](https://camo.githubusercontent.com/c2588b5670f2c910b8cc849ace22a22efda8956b7c2f797d11d2096bbfc7b1f5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322532422d3737374242342e737667) [![MIT license](https://camo.githubusercontent.com/16e07f8652b392140531cf08999b755d83fb105835f3588d17cefdbb4f4eb1b9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f646f6c706869712f72656469726563742e737667)](LICENSE.md) [![Total installs](https://camo.githubusercontent.com/9fc116b36f85e7c6a741bbe8302d3219804901b349eb96a1fae465cd1e4c12a2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f646f6c706869712f72656469726563742e7376673f6c6162656c3d696e7374616c6c73)](https://packagist.org/packages/dolphiq/redirect)

 [![Redirect overview in the Craft control panel](resources/screenshots/redirects-overview.png)](resources/screenshots/redirects-overview.png)

> **Actively maintained by [Dolphiq](https://dolphiq.nl).** Redirect Manager is free and open source under the MIT license.

---

Why Redirect Manager?
---------------------

[](#why-redirect-manager)

Restructuring a site, migrating from an old CMS, or renaming pages? Don't lose your visitors — or your SEO ranking — to dead links. Redirect Manager lets editors and developers manage redirects themselves, without touching server config or deploying code.

- ⚡ **Zero overhead on healthy pages.** Redirects resolve *only* when a URL would otherwise 404 — matches are cached and never run on pages that already exist. A live page is never shadowed.
- 🔁 **Permanent (301) &amp; temporary (302)** redirects, with per-redirect status codes.
- 🧩 **Flexible matching** — exact, `` named parameters, and `*` wildcards, substituted into the destination.
- 🪄 **Automatic redirects on URI change** — rename an entry and a 301 is created for you (loop-safe).
- 🎯 **Catch-all 404 handling** — register every missed URL and create a redirect from it in one click.
- 📥 **CSV import/export** — bulk-manage redirects from the control panel.
- 📊 **Insight built in** — per-redirect hit count + last-hit date, plus a **"Latest 404s" dashboard widget**.
- 🔗 **GraphQL** — query your redirects via the API.
- 🧑‍💻 **Made for everyone.** A clean, native control-panel UI for admins *and* non-admin authors.
- 🌐 **Multi-site aware** · 🔌 **Feed Me support** · 🗣️ **Translated into 16 languages** (EN, NL, DE, FR, ES, IT, DA, NB, SV, PT, PT-BR, PL, CS, FI, JA, ZH-CN, RU).

Requirements
------------

[](#requirements)

VersionCraft CMS5.0 or laterPHP8.2 or later> On an older Craft? Use the `2.x` release line for **Craft 4**, or `1.x` for **Craft 3**.

Installation
------------

[](#installation)

**From the Craft Plugin Store** — go to **Settings → Plugins**, search for **Redirect Manager**, and click **Install**.

**With Composer:**

```
composer require dolphiq/redirect
php craft plugin/install redirect
```

That's it — open **Site redirects** in the control panel and add your first redirect.

Upgrading
---------

[](#upgrading)

Each release line tracks a Craft major. Upgrade Craft and the plugin together, one major at a time.

PluginCraftPHP`1.x`Craft 37.x – 8.0`2.x`Craft 48.0.2+`3.x`Craft 58.2+After any upgrade, **run the migrations** (the control panel will also prompt you):

```
composer require dolphiq/redirect:^3.0   # match your target Craft major
php craft migrate/all
php craft project-config/apply           # if you deploy project config
```

**Craft 3 → 4 (`1.x` → `2.x`)**

- Requires PHP 8.0+. The element index moves to Craft 4's `_layouts/elementindex`.
- Query-string parameters are now passed through to the destination on a successful redirect.
- No redirect data changes — your existing redirects keep working.

**Craft 4 → 5 (`2.x` → `3.x`)**

- Requires Craft 5 and PHP 8.2+.
- **Behaviour change — redirects no longer shadow real pages.** Resolution is now *event-based*: a redirect is only applied when a URL would otherwise 404. Previously a redirect could override a page that existed at the same path; now the real page wins. If you relied on that shadowing, recreate those as content/route changes.
- Migrations add `matchType`, `priority`, `postDate`/`expiryDate` and the 404-analytics tables, and back-fill a match type for every existing redirect (inferred from its source). Existing redirects keep working unchanged.
- 404 analytics are **opt-in** (off by default) and store no personal data — enable them in **Settings** if you want them.
- **Deploy note:** reset PHP **opcache** on deploy (or enable `opcache.validate_timestamps`), or new control-panel actions can 404 until the cache clears.

See the [changelog](CHANGELOG.md) for the full list of changes per version.

Usage
-----

[](#usage)

Add a redirect under **Site redirects → New redirect**. Pick a **match type**, enter a source and destination URL, choose the redirect type — and use **Test this redirect** to check a URL before saving.

 [![Redirect edit form with match-type picker and live test](resources/screenshots/edit-form.png)](resources/screenshots/edit-form.png)

A few common patterns:

#### Rename a page (exact match)

[](#rename-a-page-exact-match)

```
Source URL:       about-us
Destination URL:  about

```

#### Redirect to another (sub)domain

[](#redirect-to-another-subdomain)

```
Source URL:       shop
Destination URL:  https://store.example.com

```

#### Match a parameter and reuse it

[](#match-a-parameter-and-reuse-it)

```
Source URL:       category//overview.php
Destination URL:  overview/category/

```

#### Wildcards

[](#wildcards)

```
Source URL:       docs/*
Destination URL:  help/*

```

`docs/getting-started` → `help/getting-started`. The `*` matches across path segments and is substituted into the matching `*` in the destination.

👉 See [RULES.md](RULES.md) for the full reference of matching rules and more examples.

Automatic redirects
-------------------

[](#automatic-redirects)

When an entry's URI changes (you rename or move it), Redirect Manager creates a **301** from the old URI to the new one automatically — and removes any reverse redirect so renames can't loop. Toggle it with the `autoCreateRedirectOnUriChange` setting.

Import &amp; export (CSV)
-------------------------

[](#import--export-csv)

On the **Site redirects → Import / Export** page, use **Export CSV** to download all redirects, or **Import CSV** to bulk-add them. Columns: `sourceUrl, destinationUrl, statusCode` (a header row and blank/incomplete rows are skipped; missing status codes default to `301`).

 [![Import / Export page](resources/screenshots/import-export.png)](resources/screenshots/import-export.png)

GraphQL
-------

[](#graphql)

Query your redirects through Craft's GraphQL API:

```
{
  redirects(siteId: 1) {
    sourceUrl
    destinationUrl
    statusCode
    hitCount
  }
}
```

Catch-all 404 handling
----------------------

[](#catch-all-404-handling)

Enable **Use a Catch All page template** in the plugin settings and point it at a Twig template. Every URL that would otherwise 404 is then served by that template (with a proper `404` status) and recorded in the **Registered catch all urls** list — including a hit count and last-hit date.

Spot a URL that should point somewhere? Click it to create a redirect instantly.

 [![Registered missed URLs with hit counts](resources/screenshots/catch-all-missed-urls.png)](resources/screenshots/catch-all-missed-urls.png)

Keep an eye on them from the dashboard with the **Latest 404s** widget:

 [![Latest 404s dashboard widget](resources/screenshots/dashboard-widget.png)](resources/screenshots/dashboard-widget.png)

Settings
--------

[](#settings)

 [![Redirect Manager settings](resources/screenshots/settings.png)](resources/screenshots/settings.png)

- **Activate redirects** — globally enable or disable all redirects without deleting them.
- **Use a Catch All page template** — turn on 404 handling and missed-URL tracking.
- **Catch all template** — the Twig template that renders your 404 page.
- **Automatic redirects on URI change** — create a 301 automatically when an element's URI changes.

Documentation
-------------

[](#documentation)

- **[Matching rules](RULES.md)** — exact, named ``, constrained ``, wildcard `*`, and query-string parameters.
- **[Developer reference](DEVELOPERS.md)** — settings, service API, events, caching, GraphQL and Feed Me.

Roadmap
-------

[](#roadmap)

- Priority/ordering control for overlapping rules
- Richer 404 analytics

Have an idea or found a bug? [Open an issue](https://github.com/Dolphiq/craft-plugin-redirect/issues) — contributions are welcome.

Credits
-------

[](#credits)

Created and maintained by **[Dolphiq](https://dolphiq.nl)** — Johan Zandstra.

With thanks to all [contributors](https://github.com/Dolphiq/craft-plugin-redirect/graphs/contributors), including Venveo (Ransom Roberson), 24hoursmedia, Mosnar, boscho87, HelgeSverre and ohlincik.

License
-------

[](#license)

Released under the [MIT License](LICENSE.md).

###  Health Score

66

—

FairBetter than 99% of packages

Maintenance86

Actively maintained with recent releases

Popularity47

Moderate usage in the ecosystem

Community24

Small or concentrated contributor base

Maturity88

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 83.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~113 days

Recently: every ~309 days

Total

30

Last Release

19d ago

Major Versions

1.1.1 → 2.0.02022-06-24

2.0.1 → 4.02026-06-13

4.0 → 5.0.02026-06-14

PHP version history (2 changes)4.0PHP ^8.0.2

5.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/9dfab1936de2791991111dcf8e0dc68b0ca43d1fedda94dc793e6dadcb467a09?d=identicon)[dolphiq](/maintainers/dolphiq)

---

Top Contributors

[![johanzandstra](https://avatars.githubusercontent.com/u/4737521?v=4)](https://github.com/johanzandstra "johanzandstra (177 commits)")[![rickdegraaf-dq](https://avatars.githubusercontent.com/u/56675920?v=4)](https://github.com/rickdegraaf-dq "rickdegraaf-dq (8 commits)")[![kringkaste](https://avatars.githubusercontent.com/u/964698?v=4)](https://github.com/kringkaste "kringkaste (4 commits)")[![JoshC96](https://avatars.githubusercontent.com/u/31444107?v=4)](https://github.com/JoshC96 "JoshC96 (3 commits)")[![Mosnar](https://avatars.githubusercontent.com/u/3810939?v=4)](https://github.com/Mosnar "Mosnar (3 commits)")[![dolphiq-allard](https://avatars.githubusercontent.com/u/4312073?v=4)](https://github.com/dolphiq-allard "dolphiq-allard (3 commits)")[![boscho87](https://avatars.githubusercontent.com/u/11815871?v=4)](https://github.com/boscho87 "boscho87 (2 commits)")[![barbarj](https://avatars.githubusercontent.com/u/2942306?v=4)](https://github.com/barbarj "barbarj (2 commits)")[![24hoursmedia-craftcms](https://avatars.githubusercontent.com/u/37671572?v=4)](https://github.com/24hoursmedia-craftcms "24hoursmedia-craftcms (1 commits)")[![sergeifilippov](https://avatars.githubusercontent.com/u/123676?v=4)](https://github.com/sergeifilippov "sergeifilippov (1 commits)")[![brandonkelly](https://avatars.githubusercontent.com/u/47792?v=4)](https://github.com/brandonkelly "brandonkelly (1 commits)")[![dwheeldo](https://avatars.githubusercontent.com/u/47947013?v=4)](https://github.com/dwheeldo "dwheeldo (1 commits)")[![HelgeSverre](https://avatars.githubusercontent.com/u/1089652?v=4)](https://github.com/HelgeSverre "HelgeSverre (1 commits)")[![iparr](https://avatars.githubusercontent.com/u/497635?v=4)](https://github.com/iparr "iparr (1 commits)")[![leigh-ochsner](https://avatars.githubusercontent.com/u/164410967?v=4)](https://github.com/leigh-ochsner "leigh-ochsner (1 commits)")[![ohlincik](https://avatars.githubusercontent.com/u/1297647?v=4)](https://github.com/ohlincik "ohlincik (1 commits)")[![RobWouters](https://avatars.githubusercontent.com/u/345230?v=4)](https://github.com/RobWouters "RobWouters (1 commits)")

---

Tags

301-redirectcraftcraft3craftcms-pluginpluginredirect-pluginseoseo-optimizationcmsredirectCraftcraftcmscraft-pluginseo

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/dolphiq-redirect/health.svg)

```
[![Health](https://phpackages.com/badges/dolphiq-redirect/health.svg)](https://phpackages.com/packages/dolphiq-redirect)
```

###  Alternatives

[nystudio107/craft-seomatic

SEOmatic facilitates modern SEO best practices &amp; implementation for Craft CMS 5. It is a turnkey SEO system that is comprehensive, powerful, and flexible.

1741.5M61](/packages/nystudio107-craft-seomatic)[verbb/formie

The most user-friendly forms plugin for Craft.

102393.6k70](/packages/verbb-formie)[verbb/comments

Add comments to your site.

13753.9k](/packages/verbb-comments)[verbb/vizy

A flexible visual editor field for Craft.

4250.4k](/packages/verbb-vizy)[verbb/hyper

A user-friendly links field for Craft.

24147.8k12](/packages/verbb-hyper)[vaersaagod/seomate

SEO, mate! It's important.

4442.8k2](/packages/vaersaagod-seomate)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
