Purple Redirects
Purple Hub
Whenever the slug of a post or taxonomy changes, we create a redirect in the Purple Hub to point the user to the new, changed item and prevent broken links on your site.
You can also create your own redirects or import them from a JSON file.
The redirect feature has its own settings page, which is used to create new redirects (or status codes) and also lists all the redirects created in your Purple Hub. You can find the settings page in the menu in your Purple Hub under 'Redirects'. Redirects are synchronized with the Content Cloud and are also available via the Catalog API.
You can create or change redirects with any role in Purple Hub.
Redirects can be created in three ways: 1. Automatically, on the content you want to redirect itself 2. Manually, by creating a redirect/status code on the redirects settings page. 3. By importing using the import functionality on the redirects settings page.
You can also update existing redirects.
When an existing (and published) slug is changed within a permalink on a piece of content, a redirect is automatically created pointing to the new permalink.
This works for articles (and all post types) and taxonomies:
Once you have created the redirects from content, your new redirect will automatically be listed on the Redirect Features page and will be executed as a 301 redirect.
Description of the Redirects settings
1.Content Type: Defines the type of content for which you want to create a redirect: Generic: no specific redirect is defined, can be used for any content type Content: for articles, pages, or any other post type Taxonomy: for tags, categories or any other type of taxonomy Collection: for collections
2. Redirect Type: To understand which redirect type is appropriate for your use case, read the explanation of Redirect Types here.
301: Permanent redirect 302: Temporary redirect 307: Temporary redirect 410: Status code: Removed 451: Status code: unavailable due to legal reasons
3. Release Type: Indicates the type of publishing status of your content for which you want to perform the redirect. Release: to be selected if the content is already published Preview: to be selected if the content hasn't been published yet and is still in preview mode
4. Old Slug: Used to map your redirect to the existing content, the current slug (permalink within the URL) of your content must be entered here with a slash ('/') e.g. '/kultur'.
5. New Slug: Used to redirect the content to its new location, the new slug (permalink within the URL) must be entered here with a slash ('/') e.g. '/lokales'.
6. Create or update redirects: Confirm and execute the above changes so that the redirect is created immediately. The new redirect will be listed on the Redirect Settings page, below this button.
If there is already a redirect with the same combination of content type and old slug, it will be updated instead of creating a new redirect.
Redirect imports This feature is available from the Redirect settings page in Purple Hub. For example, if you have multiple redirects in your old system that you want to migrate to your Purple Hub, you can easily import them. This is particularly useful for migration scenarios where you need to match numerous old URL structures to new URL structures. To do this, create an import JSON file that contains the same values/properties that the manual redirect feature above requires when creating a new redirect/status code. Edit the JSON locally and upload it. If you want to change the redirects, download the file, change it and upload it again to overwrite the old status. If you upload a new file that does not contain your old redirects, only the new ones will remain, the old ones will be deleted.
1.Choose file: Used to upload your JSON file for mapping the redirects. You can download and fill this example file with the redirects, which you would like to import.
Example file:
2. Import redirects file: Confirms execution of the uploaded redirect import and converts the elements to redirects. When executed, they will be listed below on the Redirect Settings page in the Redirect Overview.
Example extract of a JSON file for importing redirects
[ { "identifier": "/oldslug", "target": "/newslug", "contentType": "content", "redirectType": "301", "releaseType": "release" } ]
identifier Defines the old slug, which you want to be redirected. Start the URL path with a slash e.g. "/oldslug". target Defines the new slug, which you want the old URL to link to. Start the URL path with a slash e.g. "/newslug". contentType Defines the type of content for which you want to create a redirect: Generic: no specific content type is defined, can be used for any content type Content: for articles, pages, or any other post type Taxonomy: for tags, categories or any other taxonomy type Collection: for collections redirectType Defines the type of redirect or status code that you want to be performed for your redirect. 301: Permanent redirect 302: Temporary redirect 307: Temporary redirect 410: Status code: Removed 451: Status code: unavailable due to legal reasons releaseType Defines the type of Publishing status of your content for which you want the redirect to be performed. release: if the content is already published preview: if the content isn't published yet and is still on Preview mode
To update an existing redirect, simply use the same function as to create a manual redirect. Use the initial source slug as 'old slug' and the new target slug as 'new slug'. The target slug you defined for the previously created redirect won't be relevant any more.
On the Redirects settings page, you have the option to perform bulk actions, if you want to edit numerous redirects at the same time so that you don't have to touch the one by one.
Bulk actions:
Delete permanently (1): You can mass-select the items on which you want the permanent deletion to be executed by ticking the box next to the item in the list of redirects (2).