URL Redirects

WATCH THE VIDEO

URL redirects are used to create the alias-based short URLs, for example: http://www.mywebshop.com/christmas_sales.

An alias is easier to remember than a full path. It can contain strong words which will improve the ranking in search engines.

Create URL Redirect

Step 1: In Sana Admin click: Setup > Search engine optimization > URL redirects.

Step 2: On the URL redirects tab, click Add URL redirect.

Step 3: Enter the alias. Use the most common word or a phrase for a page to which you create a redirect.

NOTE

The Alias field should NOT contain any of these special characters:

# {} [] | \ ^ <> *

"?" is allowed only if the URL contains some parameters, for example /shop/Product.aspx?code=0102023&category=notebooks

Step 4: Set the internal page or external URL:

  • Internal page: To create a redirect to the page within a webstore. These pages are language-independent. Select a page to which a redirect should be created.
    You can also create a blank page that will be automatically selected as the internal page and fill it with content later.

  • External URL: To create a redirect to the external website. A redirect to the language-specific page within a webstore can be created also. A link of the external website or language-specific page within a webstore must be copied to the External URL field.
    If you enter external URL, it should be specified with the protocol at the beginning of the URL, for example: http://sana-commerce.com/.
    If you link an external URL to the alias, you can also allow or forbid search engine crawlers to follow it using the option Allow followed by robots.

NOTE

When you are redirected to the language-independent page, it will be opened in the language which has been used during the last webstore visit.

If you are redirected to the page and have not entered the webstore before, it will be opened using the default language of the webstore.

Step 5: Select the status code to specify how a Web browser issues a new request at a different location. You can either select the Permanent checkbox to send the Permanent (301) status code to the client or do not select and use the default option which sends the Found (302) status code.

Status code

Description

Found (302)

Used to tell the Web client to issue a new request to the location. This is the default option.

Permanent (301)

Used to tell the Web client that the location for the requested resource has permanently changed.

On the URL redirects tab, you can search for a specific URL redirect by alias and sort all URL redirects by alias and permanent status.

Import URL Redirects

You can import URL redirects into Sana from a CSV file. It can be useful, if you need to set up a large number of URL redirects.

On the URL redirects tab, click Import.

Download the CSV template and fill it in with the following data:

Alias

The alias of a URL redirect.

Link

Enter the URL of the internal webstore page or the external website URL.

Internal page

The internal Sana URLs must be specified without webstore domain. If you create a redirect for the internal webstore page, you must enter the part of the URL which is after the webstore domain with all slashes.

Make sure that the internal page URLs are entered correctly. To check the internal page URLs, on the URL redirects tab, click Add URL redirect and in the Internal page field, enter the URL. In this way, you can get the correct internal page URL. If you enter the incorrect internal page URL in the CSV file, it will not be imported into Sana.

Example: /profile/register

Example: new-arrivals

External URL

If you create a redirect to the external website, you must enter the complete website URL with the protocol.

Example: https://www.sana-commerce.com/

If you link an external URL to the alias, you can also allow or forbid search engine crawlers to follow it using the option Allow followed by robots.

Permanent

Define whether this is a permanent redirect. This parameter defines how a Web browser issues a new request at a different location.

The following values are available:

  • 0: Not permanent (302 status code). Used to tell the Web client to issue a new request to the location.
  • 1: Permanent (301 status code). Used to tell the Web client that the location for the requested resource has permanently changed.

If a URL redirect already exists (based on the alias), it will be updated.

Once the CSV file is uploaded to Sana, you will see the total number of processed URL redirects, how many URL redirects were created, updated and failed. If some URL redirects were not imported into Sana, you can see the reason of it, fix it and upload the CSV file to Sana again.