Create redirections for better navigation on your site
Advanced website settings
Create page redirections on your website with a 301 or 302
A redirection sends visitors from one web page created on your site to another. You can create 301 or 302 redirections in your manager, in Settings > Global settings > Redirections.
In this tutorial we will see what 301 and 302 redirections are for and how they improve your search ranking on Google. Above all, we will see how to create 301 and 302 redirections to build a well-ranked site on every search engine.
What is a redirection?
Let's take a simple example: you had a page "A" on your site (whose address is "mypage.html") that has been moved or deleted. It can no longer be reached.
To avoid an error 404 page, you can create a redirection. Visitors who had bookmarked it and the search engines will be "redirected" to another page of your site. That way, you won't lose the visitor.
A redirection automatically sends the visitor who tries to view page A to the page of your choice.
This has two benefits:
you won't send the visitor to an error 404 page but to alternative content that you have judged relevant.
you won't lose the search ranking of the deleted page: you will "transfer" it to the new page the redirection leads to.
Different uses of a redirection
There are two main reasons to create a redirection, the first being more obvious and more common than the second.
Moving a page.
If you move the page (to another category, for example), its URL will change. So that visitors don't land on an error page, you can automatically redirect them to the page's new location (a sort of "permanent detour").
Deleting a page.
In this case it is up to you to decide where it makes most sense to send the visitors who originally wanted to see the deleted page.
Creating a redirection
From your manager, go to Settings > Global settings > Redirections.
Then click the Add a redirection button. A small window opens and offers several settings:
Scope : internal or external. This lets you specify whether you want to redirect your visitor to another page of your site or to a completely different site.
Source URL : the URL segment you want to redirect. In our earlier example you would enter: pages/mypage.html
Destination URL : the URL segment (for an internal redirection) or the URL (for an external redirection) to which you want to redirect the visitor who requested the source URL.
Here is also a description of the advanced options:
Redirection code: the 301 redirection (permanent) lets search engines "pass on" the ranking of page A to page B. The 302 redirection only redirects the visitor and leaves the ranking with page A.
Plan expiration: if your redirection is only temporary for some reason, you can specify an expiry date.
Advanced use of redirections
Add a link to another module in a drop-down menu
Redirections can also be used for other purposes than those explained above: for example, to put a link to a contact form or to an Agenda event in a drop-down list that only contains links to pages.
In the horizontal menu, you cannot put this kind of list of pages with a contact form or an agenda event (or any other element of the site) among the links. A redirection gives you this result quite simply.
In the page category where you want to add a link to another element of the site, add a new page and give it the title you want to see appear as a link.
In the visual editor, as a reminder, enter for example the URL of the target page, the one that will be displayed after the redirection.
The added page will appear in the drop-down list with the other pages. To redirect it, add a new redirection in Settings > Global settings > Redirections. Set the Scope to internal and enter only the relative URL of the source page (the link) "pages/category/page-title.html" to the relative URL of the target element "contact/form.html". Save and check that it works on the site, making sure you reload the page beforehand.
Use a Pages module page as a module home page
It is sometimes easier to create a module's home page in the Pages module, with the ability to add content through rows and columns and to set up widgets, than in the space provided for it on the module, for example via Add-ons > Store > Settings > Homepage. With redirections, you can create a module's home page in the Pages module and redirect the module's home page to it.
First you will need to create a hidden category: this category will not be automatically added as a link in widgets and drop-down menus.
The category URL will be visible in the address bar, so avoid putting "hidden pages" in the title of the hidden category.
Once the page is created and the various content added, you can add a redirection in Settings > Global settings > Redirections from the home page of the module concerned (shop/ for example) to the hidden page you created.