Skip to main content

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, ^/example.com/page?$ to https://example.com/page2/?

Redirects page

Add or modify existing query parameter-based redirects

For example, example.com/*?outputType=amp to m.example.com/*

Redirects page

Add or modify existing domain name-based redirects

For example, m.example.com/* to www.example.com./*

Redirects page

Add or modify existing protocol-based redirects

For example, http.example.com/* to https.example.com./*

Redirects page

Story-based and vanity URL redirect requests, both single and multi-site

For example, http.example.com/sports1.html to https.example.com./sports2.html

Draft API

Geo-based redirects or geolocation-based redirects

For example, renaming an article like example.eu/politics/story1 to example.com/politics/story2

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 sandbox.<customer>.com to origin.sandbox.<customer>.com

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.

  1. Navigate to the Delivery application.

  2. Click URLs > Redirects. The Redirects page opens.

  3. Select a website to add redirect rules to.

  4. Click Add Rule. The Add Rule pane opens.

    To edit an existing rule, click icon_ellipsis.png > Edit.

  5. 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=argentinaOriginal 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.

  6. 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.

  1. Navigate to the Delivery application.

  2. Click URLs > Redirects. The Redirects page opens.

  3. Select a website to add redirect rules to.

  4. Click Upload Rules. The Upload rules via CSV pane opens.

  5. 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,
  6. Click Select File and choose your CSV file.

  7. 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.

  8. 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.

  1. Navigate to the Delivery application.

  2. Click URLs > Redirects. The Redirects page opens.

  3. Select a website to delete rules from.

  4. Click icon_ellipsis.png > 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.

  1. Navigate to the Delivery application.

  2. Click URLs > Redirects. The Redirects page opens.

  3. Select the website you want to activate redirects for.

  4. Click Activate. The Activate version window opens, displaying the number of added, modified, or deleted rules.

  5. 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.

  1. Navigate to the Delivery application.

  2. Click URLs > Redirects. The Redirects page opens.

  3. Select the website you want to download redirects for.

  4. To download the latest set of rules, click icon_ellipsis.png > Download rules.

    To download a previous version of rules for this site, click icon_ellipsis.png > Show version history. Then on the version you want to download, click icon_ellipsis.png > 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.

  1. Navigate to the Delivery application.

  2. Click URLs > Redirects. The Redirects page opens.

  3. Choose the website you want to set redirect rules for.

  4. Click icon_ellipsis.png > Show version history. The Version history pane opens.

  5. Navigate to the version you want to reactive, and click icon_ellipsis.png > Reactive version.