Map a URL redirect

Version: 10.0

When you redesign your website or create a new version of an existing web page, it is important to redirect the search traffic from the old page(s) to the new page(s). You can use the mapping tool to set up a 301/302 or server transfer redirect from the original URL to the updated URL.

Important

If you add redirect mapping, redirection starts only if Sitecore cannot find a matching item, just before the user is redirected to the page not found page (HTTP 404).

To add redirect mapping:

  1. In the Content Editor, navigate to your site, click Settings, and then right-click Redirects.

  2. To redirect a map item, click Insert, and Redirect Map. For a better overview, you could decide to group your redirect map items by adding them to a Redirect Map Grouping folder.

    To redirect a map item, click Insert, and Redirect Map.
  3. Enter a name and click OK.

  4. From the drop-down list, select the type of redirect:

    • Permanent Redirect (HTTP 301) – redirects target resource to a permanently different URL.

    • Temporary Redirect (HTTP 302) - redirects target resource to a temporarily different URL.

    • Server Transfer – helps reduce server requests, keeps the URL the same and is not visible to the client. For example, when you want to transfer the current page request to another .aspx page on the same server or when you want to avoid unnecessary roundtrips to the server.

  5. If you want the redirected URL to match the original URL's query string of the request, select Shall query string be preserved upon redirect?

  6. Use the mapping section to map between the old (left) and new (right) URL paths. You can use:

    • Direct match – the path of the incoming request is equal to a pattern (patterns must start with /).

    • Regular expression – if the pattern starts with ^ (match only if the following is at the beginning of the line) and ends with $ (match only if the previous is at the end of the line) regular expression matching is used. The target can include tokens ($1, $2, and so on) that will be replaced by corresponding strings from the input. Patterns must include / at the beginning and the end. For example: ^/blogs/blogs-november/$

    Note

    For mapping old and new URLs, both methods (direct match and regular expression) are case-insensitive.

    For example:

    Redirect the designs page with a direct match:

    Redirect a page with a direct match.

    Redirect the page with a regular expression: ^/ab[cd]/$ will match the following URLs:

    • /abc/

    • /abd/

    • /abc

    • /abd

    Redirect the page with a regular expression.

Do you have some feedback for us?

If you have suggestions for improving this article,