The Journal

Redirects in Craft CMS without a plugin

Craft CMS now has built in redirects abilities, so you may not need a plugin for them in 2026.

Andrew Fairlie
Written by
Andrew Fairlie
Technical Director · 13+ years with Craft CMS
Craft CMS Published 18 Sept 2026 1 min read

Craft CMS now handles redirects natively in config/redirects.php so if you only have a handful of redirects you could add them in there and avoid a plugin.

If you have a few more, you could add a Redirects channel and update your redirects.php with something like this:

<?php

use craft\elements\Entry;

function getRedirects(): array
{
    $entries = Entry::find()
        ->section('redirects')
        ->status('enabled')
        ->cache(3600)
        ->all();

    return array_map(static function (Entry $entry): array {
        return [
            'from' => trim((string) $entry->originalPath, '/'),
            'to' => trim((string) $entry->newPath, '/'),
            'caseSensitive' => true,
            'statusCode' => (int) ($entry->statusCode->value ?? 301),
        ];
    }, $entries);
}

return getRedirects();

Where a plugin like Retour becomes useful is if you're wanting additional functionality like short URLs, automatically adding redirects when entries rename, or want to monitor 404s to catch them.

But in 2026, it may not be necessary to reach for a plugin straight away for something Craft basically does for free.

(For what it's worth, when we need it, we still use Retour)

Andrew Fairlie
Andrew Fairlie
Technical Director · 13+ years with Craft CMS

Andrew is Technical Director at Mutual, a Craft CMS Partner agency. He has been building with Craft CMS since its public beta in 2012 — working through every major version from Craft 1 to Craft 5 — and has delivered over 100 sites for clients including Apple, Transparency International, and Arts University Bournemouth.

He writes about Craft CMS on the Mutual blog and has contributed to net Magazine. At Mutual, he leads development of Mutual One, a marketing platform built on Craft CMS as its foundation.

He has spoken about Craft CMS to undergraduate students at the University of Brighton and Canterbury Christ Church University, and appeared on the Devmode.fm podcast. He has also trained other developers on working with the platform.

More from The Journal