1. Home
  2. Docs
  3. Plugin settings
  4. Canonical & old slug redirect

Canonical & old slug redirect

The main purpose of Permalink Manager is to allow WordPress users to edit the permalinks. As you may know, the URL changes may lead to 404 (“not found”) error. To prevent this from happening, the plugin will automatically redirect the old permalinks.

You can deactivate both “Canonical redirect” and “Old slug redirect” in Permalink Manager settings. These functionalities are available also in free version of plugin (Permalink Manager Lite).

Canonical redirect in Permalink Manager

The canonical redirect is enabled by default. The main purpose of this feature is to redirect from original (native) to canonical permalinks. In other words, WordPress tries to “correct” the requested URL and send a visitor to the actual URL address.

Old URL | https://example.com/?p=123
Redirect target URL | https://example.com/canonical-permalink-of-page-with-id-123/

It could be helpful, after you use Permalink Manager to adjust permalinks. The plugin will redirect a visitor trying to access old URL to new address.

Old URL | https://example.com/shop/old-original-product-permalink/
Redirect target URL | https://example.com/new-url-set-with-permalink-manager/

The native permalink (team/john-doe) was used before Permalink Manager was installed. It will lead to new custom permalink (staff/john-doe) set in Permalink Manager.

Old slug redirect

Old slug redirect” works in a similar manner to canonical redirect. Old slug redirect is used to provide a fallback for old slugs. Shortly, every time you change the slug, WordPress will save its previous version as a custom field ( _wp_old_slug).

Old URL | https://example.com/old-native-slug
Redirect target URL | https://example.com/new-updated-native-slug/

If you turn “Old slug redirect” on, the function will check if requested slug is linked to any post. If it is, WordPress will trigger redirect to the correct permalink.