Skip to main content
Skip table of contents

Simple (Literal) Redirects

Overwriting a Scroll site URL with another Scroll site URL or with an external URL can help you achieve the following:

  • Take prominent elements in your site to present ‘teaser content' and direct your users to external URLs (e.g. pinned pages or content source tiles can link to your external API documentation or support portal).

  • Maintain stable links for your in-app help (e.g. define a URL like /security and map this to a page in your Scroll site).

  • In general, customize the user flow of your help center.

Simple redirects are literal redirects, which means they always apply to a single page.

If you’re looking to apply redirects to groups of pages (e.g. to recover many broken links or 404 pages), we recommend setting up Advanced Redirects.


Create and Edit a Simple Redirect

When creating a simple or literal redirect, you need to specify which page you want to redirect from (this is the source of your redirect) and which page you want to redirect to (this is the target of your redirect).

You can create and manage simple redirects for your Scroll site from your site’s settings:

  1. From the My Sites screen, click the card that has your site’s name.

  2. From the left sidebar, click Site Settings > Redirects.

  3. Click Add new redirect. The Add redirect dialog opens.

  4. For the Redirect from field, select a page from the dropdown or directly enter a path from your Scroll site.

  5. For the Redirect to field, you can select a page from the dropdown, directly enter a path from your Scroll site or enter an external URL. We recommend you review the list of disallowed redirects to ensure that the redirect you create will work.

  6. Optional: In the Notes field, add a comment to explain what the redirect is for.

  7. Under Redirect type choose permanent or temporary. Read more about the different redirect types.

  8. Click Add. You are taken back to the list of existing redirects.

  9. Click Publish changes in the top right of the settings.

Your change will now automatically trigger a new site update (for sites set to live updates) or be applied with your next site update (for sites set to manual updates).

After the redirect is applied, whenever your selected source page is opened, it will always redirect to the target URL you have specified.

How do I create a simple/literal redirects in the advanced redirect mode?

If you use the configuration field in the advanced redirect mode, you will need to make sure to follow a set format and stick to the permitted values.

To setup a new redirect you should always use the following format:

<mode> <source> <target> <type>

For each part of the redirect, choose from the permitted values in the table below. Note that for mode and source , there is currently only one value you can choose from.

Required format:

Mode

Source

Target

Type

Permitted values:

literal

(Note: the redirect is applied to the given URL)

Relative path of the Scroll site URL

  • For internal Scroll site URLs: relative path

  • For external URLs: absolute path

  • permanent

  • temporary

Some helpful tips for creating redirects:

  • To write Scroll Site URLs you can use /my-content-source/my-article

  • For protocol-relative links (links that should remain https), you can write //www.example.com as a short-form of https://www.example.com.

  • Scroll site URLs that are set as a redirect target can contain query parameters, such as in-app help query ?inAppHelp=true.

Example of allowed redirects

CODE
literal /my-path/                   /new-path/                     temporary
literal /my-path/my-page //www.myOtherDomain.com/ permanent

Redirect types

For each created Literal Redirect, a Redirection Type will be associated with it. Scroll Sites offers two types of redirects you can select:

  • Permanent Redirect
    A permanent redirect tells browsers and search engines that the original URL has permanently moved to a new location. This is the most commonly used type of redirect when you want to preserve the SEO value of the page.

  • Temporary Redirect
    It indicates that the move is only temporary. Search engines are told to keep the original URL indexed instead of the new one. This type of redirect should be used sparingly for situations where content is temporarily moved.

Disallowed redirects

To prevent your users entering endless loops of redirects, we have placed the following limitations when creating redirects:

  • source and target value can’t be the same path

Disallowed paths

Redirecting from the site preview, root page or the search of your Scroll site is not possible. They correspond to the following disallowed paths:

  • /_search*

  • /preview*

  • /


Simple Redirect Examples

Here are some examples for how to create simple or literal redirects for a Scroll site.

Recover broken links by pointing to the next most-relevant content

The following example shows how to permanently redirect an old URL which doesn’t exist anymore because the Confluence page (and related Confluence page ID) has been deleted or changed.

You can redirect this ‘broken link’ to other content that could be relevant to the users who try to access the removed content.

In this case, set the following values:

  • Source: /my-content-source/my-article-1

  • Target: /my-content-source/my-article-2

  • Type: permanent. Uses the HTTP response status code “307”

Since the redirect is from and to page within the Scroll site, we are using relative paths for the URLs you want to redirect.

If you use the advanced mode, the redirect is:

CODE
literal /my-content-source/my-article  /my-content-source/my-article permanent

Use landing page elements to direct users to external locations

You can use the URL of a featured page or content source to direct your users to the marketplace of your app or to another external location, when they click on these elements in the landing page of a Scroll site.

In this case, set the following values:

  • Source: /my-content-source/my-article

  • Target: //www.example.com. Since the redirect is to an external page, we are using an absolute paths for the redirect target.

  • Type: permanent

If you use the advanced mode, the redirect is:

CODE
literal /my-content-source/my-article  //www.example.com permanent

Maintain stable links for your in-app help

With Scroll Sites, you can display a simplified view of your help content within your own app using a widget or iframe. More generally, you might also want to directly link to and open specific articles in your Scroll site when your users click defined elements in your app or the F1 button.

To ensure that your users reliably end up at the right location in your site (even if the original pages was deleted or the content moved to a different page), define a new URL for your specific article (e.g /in-app-help/my-article) and map this to the corresponding article in your Scroll site:

In this case, set the following values:

  • Source: /in-app-help/my-article

  • Target: /my-content-source/my-article-2

  • Type: permanent

Since the redirect is from and to page within the Scroll site, we are using relative paths for the URLs you want to redirect.

The query parameter ?inAppHelp=true does not need to be specified in the redirect. The parameter will always be respected (and simplified view of the page shown) if appended to the target URL.

If you use the advanced mode, the redirect is:

CODE
literal /in-app-help/my-article /my-content-source/my-article-2 permanent

You can now embed the newly defined URL in your app’s source code. Whenever the target location of the in-app help content changes, you can edit the redirect instead of modifying the URL in the source code of your app.

Escaping Period/Dots in the Redirect

Dots in the source URL of your redirect can be escaped with a \. Add the character right before the period, like this:

/content-source/v1\.0/(.+) /documentation/current/$1 permanent

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.