Tempest has a few different ways of handling redirects:
- Migration redirects
- Pattern-Based redirects
- Bulk One-off redirects
- Single One-off redirects
- Automatic redirects for content URL changes
Each one of these buckets serves a different purpose which is outlined below. Before diving in, we will first review how to manage 404s since this is one of the primary reasons that publishers want to implement redirects to begin with.
Many publishers configure redirects as part of mitigating 404s. The general sentiment is that 404s are bad for SEO. That is not entirely true.
404s are a normal part of the web. When content no longer exists, Google prefers that the page return a 404 response code. This tells the browser and servers that this page does not exist, and as a result, the page will not be crawled or indexed by search engines. Google recommends that you always return a 404 or 410 response for content that no longer exists. The fact that some URLs on the site no longer exist / return 404s does not affect how the site’s other URLs (the ones that return 200 (Successful) perform in Google's search results.
In addition to providing the correct 404 http response, publishers should include a custom 404 page to help indicate to the user that the page is not found and also provide an entry point to other valid content. The latter is part of the site onboarding process so all Tempest sites get this automatically.
This does not mean that 404s are harmless to SEO. It just means that a site should only use 404s when appropriate.
Publishers should address 404s in the following cases:
- Misspelled URLs for valid pages, in which case a 301 redirect should be implemented to point to the valid URL. This use case could be solved with a single one-off redirect.
- When content is permanently moved, a 301 redirect from the old to the new URL should be implemented. There are various instances in which this use case arises on Tempest:
- During migration, in which case we handle these automatically for successfully migrated items.
- Pre or post launch via patterned based redirects for areas of the site that no longer exist ie. paginated hub pages that now only resolve to a single hub page on Tempest (we do not have paginated hub pages).
- Pre or post launch via a single one-off redirect if a content item was manually ported and does not have an automatic redirect in place ie. basic pages.
- This is also handled on an ongoing basis if the content item URL is changed via alternate paths (this is done automatically on Tempest).
It is our recommendation that publishers should never just blanket redirect all 404 content to the homepage and/or a random hub page. Per the above, content that no longer exists should 404. This is the expected behavior. From Google: "Returning a code other than 404 or 410 for a non-existent page (or redirecting users to another page, such as the homepage, instead of returning a 404) can be problematic."
As part of migrating content onto Tempest, we will automatically set up redirects for every content item that is successfully imported. These redirects are logged in our database. The goal of these redirects is to help alleviate the SEO hit that publishers take when migrating to Tempest; this is a side effect of changing URL structures which is typical for any CMS migration and is not unique to Tempest.
The first step in defining redirects should be to review the set of URLs that are 404'ing to identify common patterns that will match a large number of URLs. Tempest supports mod_rewrite-style redirects, which allows one pattern to match many URLs. An example of this is matching WordPress-style pagination URLs, like /category/page/10. With one pattern, Tempest can identify all URLs similar to that (e.g. /page/5, /tag/page/2) and redirect them to the non-paginated URL.
Using pattern-based redirects like this will dramatically reduce the number of URLs that need to be created and maintained as one-offs. These redirects should be delivered in Say in the form of mod_rewrite-style patterns (regular expressions) and substitutions.
These pattern-based redirects should be sent to Tempest Support to implement.
Bulk One-off Redirects
In the case where there is not a pattern that would efficiently match a large number of URLs, these should be identified as individual one-off redirects with a source URL to a target URL. These should be delivered to Say in the form of a CSV file with the following columns:
- source_relative_url (relative URL for the source of the redirect, unique from within your site)
- target_absolute_url (absolute URL for the target of the redirect)
- status_code (HTTP status code, almost always 301)
There are a few criteria that we check for that would prevent an individual one-off redirect from being created, or that could cause the redirect to be modified in some way:
- The tool will make an HTTP request to the source URL. If the response to that request results in anything other than a 404, the redirect is skipped. This is a safety precaution to prevent overwriting valid, working URLs with a redirect.
- The tool will make an HTTP request to the target URL. If the response is a 301, the target URL for the redirect is updated with the new location; if the response is a 200 or 302, the target URL is maintained as-is; if the response is an error, the redirect is skipped.
- If the source or target URLs are invalid for some other reason (e.g. a URL-encoding issue), the redirect is skipped.
Single One-off Redirects
Users can add one off redirects via the CMS. This is typically used for vanity URLs. To create a one-off redirect follow these steps:
- Login to Tempest
- Access the Manage Redirections page
- Select the blue button in the upper right hand corner “+ Create Redirect”
- Define the source URL (as a relative URL, unique from within your site)
- Define the target URL (as an absolute URL)
- Click on “Create”
This will automatically create a 301 redirect from the source to the target URL.
Note that the source URL must 404 in order for a redirect to work. This prevents valid content from being redirect to another page. This means that if you are redirecting from a stale page on your Tempest site, the content must be unpublished in order for a redirect to successfully direct this page elsewhere.
Automatic Redirects for Content URL Changes
When a URL of a content item is changed we automatically create a redirect to the new URL of the content item.
The ways that this can be triggered are the following:
- The slug of the content item is changed ie. a spelling change is made, it is rewritten etc
- A content item is republished and has a date based URL ie. the URL has changed because the date has changed
- A primary section assignment has changed on the content item causing the URL to change
- A bulk action was applied to a content item that changed the URL
While we do not encourage changing the URL of a published item, when this is done, we set up the redirects automatically to help mitigate social or search equity loss.