URL Redirects
Manage 301 and 302 redirect rules from the admin panel.
TL;DR
Admin → Redirects: add a rule with a From URL (the old path) and a To URL (the destination). Choose 301 (permanent) or 302 (temporary). Redirects are applied on every request.
Details
301 vs 302
| Type | Name | When to Use |
|---|---|---|
| 301 | Moved Permanently | URL has changed forever. Search engines transfer SEO value (link equity) to the new URL. Old URL is eventually dropped from the index. |
| 302 | Found (Temporary) | URL is temporarily pointing elsewhere. Search engines keep the original URL indexed. |
Default: use 301 for almost everything — slug changes, WordPress migration, site restructuring. Only use 302 if you genuinely intend to restore the original URL later.
Adding a Redirect
- Go to Admin → Redirects.
- Click Add Redirect.
- Enter the From URL — the path being requested, relative to the domain root (e.g.,
/old-post-slug,/wordpress/2023/01/my-post/). - Enter the To URL — the destination. Can be a relative path (
/new-post-slug) or a full URL (https://example.com/new-post-slug). - Select the redirect Type: 301 or 302.
- Click Save.
Common Use Cases
- Changed a post slug: add a 301 from
/old-slugto/new-slugto avoid breaking existing links and preserve search rankings. - WordPress migration: after importing WordPress content, add 301 redirects from the old WordPress URL structure (e.g.,
/year/month/slug/) to Pubvana's/post/slugformat. - Vanity URLs: redirect a short memorable URL to a longer destination.
- Moved content: redirect an old category or page path to its new location.
Redirect Matching
Redirects are matched against the full request path (without the domain). The match is exact — /old-path does not match /old-path/subpage. For pattern-based redirects (not yet supported in the UI), you can add entries to app/Config/Routes.php directly.
Deleting a Redirect
On the Redirects page, click Delete next to the rule you want to remove. There is no confirmation dialog — the rule is removed immediately.