Creating page redirect rules

Recruitment Marketing Public

A Page redirect rule allows you to create and use shorter, more friendly URLs that redirect to pages.

For example: 

https://careers.corp.com/grads

Redirects to: 

http://careers.corp.com/some/page/deep/inside

There are two types of redirects:

  • Page Redirect: This is where the user is routed to another regular page on their careers website.
  • URL Redirect: This is where the user enters a Clinch URL and is redirected to any web URL.

Creating a Page redirect rule

  1. From the side menu, under Company, click Settings.
  2. Under Web, click Page redirect rules.
  3. Click New.
    Screenshot to show layout for page redirect rules screen
  4. On the next page, configure the following:
    1. Match on: Select Match the request path against the request field, ignoring query parameters.
    2. Path: Enter a Path. This is the short string that will be at the end of the URL.
    3. Redirection: Select Page Redirect.
    4. Page: Select the page to which you wish to send users. Only regular pages are selectable.
    5. Status Code: Select the relevant redirect type.
      1. Permanent redirect: A permanent redirect (301) is a permanent relocation of your URL.
      2. Temporary redirect: A temporary redirect (302) is a temporary change that redirects both users and search engines to the desired new location for a limited amount of time until the redirect is removed.
  5. Click Save.

Screenshot 2023-08-18 at 14.31.26.png

Creating a URL redirect rule

  1. From the side menu, under Company, click Settings.
  2. Under Web, click Page redirect rules.
  3. Click New.
  4. On the next page, configure the following:
    1. Match on: Select Match the request path against the request field, ignoring query parameters.
    2. Path: Enter a Path. This is the short string that will be at the end of the URL.
    3. Redirection: Select URL Redirect.
    4. Status Code: Select the relevant redirect type.
      1. Permanent redirect: A permanent redirect (301) is a permanent relocation of your URL.
      2. Temporary redirect: A temporary redirect (302) is a temporary change that redirects both users and search engines to the desired new location for a limited amount of time until the redirect is removed.
  5. Enter the URL to which you wish to send users.
  6. Click Save.

Screenshot 2023-08-18 at 14.35.47.png

Valid Path Examples

The redirect path should start with a / and can contain alphanumeric characters (A-Z 0-9), underscores, and dashes. For example:

https://careers.company.com/GradStart
https://careers.company.com/Chefs
https://careers.company.com/manager-jobs-2034
https://careers.company.com/manager_jobs_2034
https://careers.company.com/one
https://careers.company.com/one/two
https://careers.company.com/one/two/three

A path may be recognized as invalid if it contains any invalid characters.

Invalid Characters

https://careers.company.com/$lug

https://careers.company.com/bad%!@£$%^

Creating a URL redirect rule using regular expressions (advanced)

  1. From the side menu, under Company, click Settings.
  2. Under Web, click Page redirect rules.
  3. Click New.
  4. On the next page, configure the following:
  5. On the next page, configure the following:
    1. Match on: Select Match the request path against the request field, ignoring query parameters.
    2. Path: Enter a Path. This can be expressed as a regular expression, e.g., the regular expression /jobs\?gh_jid=(?<job_id>\d+) would match URLs such as /jobs?gh_jid=12345, but not /jobs?gh_jid=abcde. It makes a named capture available, and in this case, a named capture called job_id will be set to the value 12345. This can be referenced by the URL field.
    3. Redirection: Select URL Redirect.
    4. URL: Enter the URL to which you wish to send users. This can contain placeholders which reference named captures, e.g.,/{{locale}}/jobs/{{job_id}}. The locale placeholder will be populated with the current locale code, e.g., en-GB or es. The job_id placeholder will be replaced with 12345. Giving us a final value of /en-GB/jobs/12345?gh_jid=12345. All query parameters are appended to the redirecting URL. The job_id placeholder is a reference to the named capture in the path field; it is not a built-in placeholder. This name can be any alphanumeric string. The locale string is a built-in placeholder and is always available.
    5. Status Code: Select the relevant redirect type.
      1. Permanent redirect: A permanent redirect (301) is a permanent relocation of your URL.
      2. Temporary redirect: A temporary redirect (302) is a temporary change that redirects both users and search engines to the desired new location for a limited amount of time until the redirect is removed.
  6. Click Save.

Warning:

It is possible to create erroneous situations using regular expressions. For example, if the path is set to just the backslash (i.e. /), then that will match all paths. If the redirecting URL was set to /home, then a visiting candidate who visits /any-page will be infinitely redirected to /home, causing a browser error. Page redirect rules are evaluated in order, so the higher the page redirect rule in the list, the higher the precedence it has. It is strongly advised not to use the regular expression feature unless these concepts are understood.

Comments

0 comments

Article is closed for comments.