Configuring URL redirects
Use the Redirects page in Delivery to create and manage redirect rules for your sites. The Redirects page lets you create both 301 (permanent) and 302 (temporary) redirects directly in the application and requires minimal technical knowledge. You can use both full URLs and regular expressions to define your rules.
The Redirects page lets you create a maximum of 1000 redirect rules in a particular environment.
Note
You can also implement redirects programmatically using Draft API and resolvers. This method requires an understanding of how to interact with Draft API and how to set up resolvers.
Implementing redirects programmatically allows you to create and manage redirects and prevents the Redirects page from becoming cluttered; therefore, we recommend using Draft API when setting up redirects for stories. See How To Create Story Document URL Redirects Using Draft API and How to Setup Resolvers.
Redirect scenarios
The following table describes various scenarios when you may need to configure a redirect and the tool that Arc XP recommends using.
Scenario | Redirect tool |
---|---|
Add or modify existing ReGex- and wildcard-based redirects (path-based) For example, | Redirects page |
Add or modify existing query parameter-based redirects For example, | Redirects page |
Add or modify existing domain name-based redirects For example, | Redirects page |
Add or modify existing protocol-based redirects For example, | Redirects page |
Story-based and vanity URL redirect requests, both single and multi-site For example, | Draft API |
Geo-based redirects or geolocation-based redirects For example, renaming an article like | Contact Arc XP Customer Support. |
User agent-based redirects | Contact Arc XP Customer Support. |
Cookie-based redirects | Contact Arc XP Customer Support. |
Redirect to an alternate origin For example, redirect | Contact Arc XP Customer Support. |
Prerequisites
To use the Redirects page, you must:
have the appropriate permissions for redirects:
Viewer - can view and download rules
Content Editor - can add, edit, and delete rules, view the activated version, and download rules
Content Publisher - can add, edit, and delete rules, activate version, and download rules
be familiar with redirect types. See What are the different kinds of redirects in Arc XP?
Your team decides to update your site's structure, moving all news content from /news
to /updates
. To ensure visitors using old links still land on the correct pages, you use the Redirects page in Delivery to create the following regex redirect rule:
^/news/(.*)
redirects to/updates/\1
After adding the rule, you activate your updated ruleset to ensure the latest changes take effect.
Procedures
You can manually create or edit redirect rules.
Note
The Redirects page lets you create a maximum of 1000 redirect rules in a particular environment.
Navigate to the Delivery application.
Click URLs > Redirects. The Redirects page opens.
Select a website to add redirect rules to.
Click Add Rule. The Add Rule pane opens.
To edit an existing rule, click
> Edit.
Complete the following fields:
If source matches
Match type - select the type of redirect you want to create, either URL Path or URL Regular Expression.
URL Path - if you chose URL Path in the Match type field, enter the URL you want to redirect from.
Regular expression - if you chose URL Regular Expression in the Match type field, enter the regular expression to define the redirect source.
Then redirect to
Redirect URL - enter the URL you want to redirect to.
Absolute URL - choose this option if you're redirecting from one domain to another. This option appears only if you chose URL Path as the Match type.
Relative Path - choose this option if you're directing within the same domain. This option appears only if you chose URL Path as the Match type.
Type - choose the type or redirect you're creating: Permanent 301 or Temporary 302.
301 (permanent) is best if the URL is a permanent change. Search engines transfer ranking power from the old URL to the new one.
302 (temporary) is best for short-term changes or testing. Search engines typically keep the original URL indexed and may not transfer SEO value to the new URL.
Copy query string - select this option to copy the query string from the original URL to the redirect path.
For example, suppose you create the following rule:
Original URL:
/news?category=world&country=argentina
Redirect rule:
/news
redirects to/updates
With query string copying enabled:
Original URL:
/news?category=world&country=argentina
Original URL:Resulting URL:
/updates?category=world&country=argentina
With query string copying disabled:
Original URL:
/news?category=world&country=argentina
Resulting URL:
/updates
If set, negates the match - select this option to negate the match. This means that the redirect applies when the URL does not match the rule.
For example, suppose you create the following rule:
URL Path/RegEx:
/example/(.*)
Redirect URL:
/news/
Without negation:
/example/article-1
redirects to/news/
/example/article-2
redirects to/news/
/about
does not redirect
With negation enabled:
/example/article-1
does not redirect/example/article-2
does not redirect/about
redirects to/news/
Case sensitive rule - select this option for the URL path or RegEx condition to match only URLs that exactly match the specified capitalization.
Click Add. The system adds the redirect rule to your list of rules.
Your redirect rules are not live until you activate them. See ???.
You can upload a CSV file of redirect rules. This is particularly helpful if you have many rules.
Note
The Redirects page lets you create a maximum of 1000 redirect rules in a particular environment.
Navigate to the Delivery application.
Click URLs > Redirects. The Redirects page opens.
Select a website to add redirect rules to.
Click Upload Rules. The Upload rules via CSV pane opens.
Click Download sample .csv to download a template. Update the template to include your redirect rules.
Note
To make a path case sensitive in the CSV file, add a colon (:) at the beginning of the path field. For example:
id,path,regex,redirectURL,useRelativeUrl,useIncomingQueryString,statusCode,submittedBy,submittedAt,errors 8b2130f9-bbcb-42ee-9284-b76b74194fe9,:/caseSensitivePath,,/path1/path2/path3,relative_url,False,301,jsmith@example.com,1657157074,
Click Select File and choose your CSV file.
Choose one of the following options:
Replace all rules - choose this option to replace all existing rules with the rules in your CSV file.
Append to existing - choose this option to add your CSV file to the existing rules.
Click Upload rules. The system imports your rules.
Your redirect rules are not live until you activate them. See ???.
You can delete redirect rules that you no longer need.
Navigate to the Delivery application.
Click URLs > Redirects. The Redirects page opens.
Select a website to delete rules from.
Click
> Delete on the rule you want to delete.
Your deleted rules do not become inactive until you reactivate the ruleset. See ´???.
After you add, modify, or delete your rules, you must activate the ruleset for the redirects to take effect on your site.
When you activate your ruleset, the system locks the screen for editing or creating new rules.
Note
Activating a redirect version can take up to 20 minutes.
Navigate to the Delivery application.
Click URLs > Redirects. The Redirects page opens.
Select the website you want to activate redirects for.
Click Activate. The Activate version window opens, displaying the number of added, modified, or deleted rules.
Click Activate again. The system activates your ruleset, during which time the screen is locked for changes.
You can download your current redirect rules to review them in another format or to make changes and re-upload.
Navigate to the Delivery application.
Click URLs > Redirects. The Redirects page opens.
Select the website you want to download redirects for.
To download the latest set of rules, click
> Download rules.
To download a previous version of rules for this site, click
> Show version history. Then on the version you want to download, click
> Download rules.
The system downloads a CSV file containing your rules to your computer.
You can reactive a previous version of your rules. You may need to revert to a previous version to undo changes or because you no longer need the most recent version.
Navigate to the Delivery application.
Click URLs > Redirects. The Redirects page opens.
Choose the website you want to set redirect rules for.
Click
> Show version history. The Version history pane opens.
Navigate to the version you want to reactive, and click
> Reactive version.