Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Nova Redirects

Nova Redirects Laravel Package

optimistdigital/nova-redirects

Nova Redirects adds a simple redirect manager to Laravel Nova. Create, edit and maintain 301/302 redirects from a dedicated Nova resource, keeping old URLs pointed at the right pages without editing route files. Includes middleware for handling incoming requests and a clean admin UI.

View on GitHub
Deep Wiki
Context7

Redirect manager for Laravel Nova

Frequently asked questions about Nova Redirects
What does optimistdigital/nova-redirects actually do?
It adds a redirect manager to Laravel Nova: a dedicated Nova resource where you create, edit and delete 301 and 302 redirects, backed by a database table. A middleware shipped with the package inspects incoming requests and issues the matching redirect before the request reaches your routes. In practice it lets you retire old URLs and point them at new pages without touching route files or redeploying.
How do I install nova-redirects with Composer?
Install it with composer require optimistdigital/nova-redirects, then run the package migrations so the redirects table exists. Publish the config file if you need to change middleware behaviour such as status codes or matching rules. Finally register the middleware in your HTTP kernel or bootstrap file so incoming requests are checked. Always check the README for the exact publish and migration commands for your version.
Which Laravel and Nova versions does this package support?
The package is built for Laravel Nova and follows Nova's major release cycle, so the Nova version you run is the primary constraint. Because the package has been published under both the optimistdigital and outl1ne vendor names, the supported Laravel and PHP ranges differ between tags. Read composer.json for the tag you intend to install rather than assuming. If you are on an older Laravel LTS, verify the constraint before adding it to a production app.
Where do I register the redirect middleware in Laravel?
You add the package middleware to your application's HTTP middleware stack, either globally or on the web group depending on whether you want redirects to apply to every request. For Laravel 11 and later that means the bootstrap/app.php file; on older versions it is app/Http/Kernel.php. Register it before the routes that would otherwise handle the old URL, since a later middleware never gets the chance to rewrite the response.
Does nova-redirects handle wildcards, regex or query strings in URLs?
Matching behaviour depends on the configuration the package ships with, and the safest approach is to test the exact patterns you need against a staging copy. Simple exact-path matches are the core use case; wildcard or placeholder matching is generally available only if the config exposes it. Query strings and trailing slashes are a common source of surprising misses, so normalise incoming paths in the admin UI and verify results with real requests rather than assuming a match.
Should I use a 301 or a 302 redirect?
Use a 301 when the move is permanent, because browsers and search engines cache it and pass link equity to the new URL. Use a 302 for temporary changes, experiments or seasonal pages where you expect the original URL to come back. Be careful with 301s during testing, since a cached permanent redirect in a browser is painful to undo. The package stores the status code per redirect, so you can mix both in the same table.
Will nova-redirects conflict with Laravel's route cache or my existing redirects?
The package resolves redirects at request time from the database, so it does not participate in route caching and works fine with cached routes. The real risk is overlap: if a route, a web server rule or another redirect package already handles a URL, only one of them wins. Decide which layer owns redirects before you adopt this package, and keep hardcoded 301s in route files or .htaccess out of the same paths.
How do I test that a redirect is working correctly?
Write a feature test that seeds a redirect record and asserts the response status and Location header, which is the most reliable check in CI. For manual verification use curl with the -I flag so you see the raw status code instead of a browser following the chain. Watch for redirect chains and loops, especially after bulk imports, since a loop of permanent redirects is invisible in a browser but obvious in a curl trace.
Can I seed or bulk import redirects instead of adding them one by one?
Yes, redirects are ordinary Eloquent records, so you can create them in a seeder, an artisan command or a migration from an old URL spreadsheet. This is the practical way to migrate a few hundred redirects off a legacy CMS without hours of clicking in the Nova UI. Keep the import idempotent so re-running it does not create duplicates, and validate that paths are normalised the same way the middleware expects.
Is nova-redirects still maintained, or should I use an alternative?
The package lives at github.com/outl1ne/nova-redirects, having moved from the optimistdigital vendor name, so use the current repository and vendor for issues and updates. Before committing, check the latest release date, the supported Nova version and whether the maintainers respond to issues. If you need framework-agnostic redirects outside the Nova admin, compare it with alternatives such as spatie/laravel-missing-page-redirector or a hand-rolled middleware. For Nova-only admin management, this package covers the common case well.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console