Redirections are used to reroute traffic of visitors and bots from one URL to another URL. They are used when a page no longer exists and when content is moved to a new page. Without a redirect, anyone landing on a deleted page, will see an error message which will also negatively affect your ranking.
Redirects in the 10Web dashboard
To make sure your clients are not landing on broken pages, you can add two of the most used redirect rules to your website pages from your 10Web dashboard. Redirects are a big part of SEO best practices, making sure to keep visitor satisfaction rates up.
301 redirect permanently
The number 301 stands for the HTTP status code of a permanent redirect. This means that your page and all of its link equity has permanently been moved to a different URL.
302 redirect temporarily
The number 302 stands for the HTTP status code of a temporary redirect. 302 and 301 are essentially the same in what they do, however, redirect 302 does not redirect all of your link equity.
Important:
If your page has moved permanently, use the 301 redirect as best practice for SEO.
Adding a single redirect from your 10Web dashboard
To move your pages permanently or temporarily:
-
Log in to your 10Web dashboard
-
Click on the website where you want to add a redirect
-
Under Hosting Services click on More > Redirects
-
Click on Add Redirect
-
From the Status drop down menu, choose a redirect type: 301 or 302
-
From the Domains drop down menu, choose the current domain or all domains for both www and non www domain names
-
In the Redirect From field, enter the link you want to redirect
-
In the Redirect To field, enter the link where the old URL will be redirected
-
Click Add Redirect
Regex
Short for Regular Expression, regex is a sequence of characters that specifies a search and search and replace pattern. Regular expressions allow you to redirect multiple pages to a single destination. You can use regex with the 10Web redirection tool. When redirecting URLs, it is useful to have a general idea of the regex character sequences.
^A – Match any string that begins with A.
A$ – Match any string that ends with A.
AB? – Match A or AB, B is optional.
AB* – Match A or AB or ABB or ABBB etc., matching B 0 or more times.
AB+ – Match AB or ABB or ABBB etc., matching B 1 or more times.
A.B – Match a string that has A, then any character, then B.
(?i) – Activates case insensitivity./post and /Post match as the same.
A|B – Match A or B.
\D - Match any non digit
\d - Match any digit
\s - Match any whitespace character
[a,b,c] - Match only a,b, or c
[^ a,b,c] - Don’t match a, b, or c
[a-z] - Match characters a through z
[0-9] - Match numbers 0 through 9
( ) - Group characters
* - Match zero or more repetitions
+- Match one or more repetitions
\ – Escape character.
.* – Match anything. Wildcard.
/ - Specifies the string.
Examples
Let's take a look at how some of these character sequences can be used when redirecting.
In this example, we are going to match and redirect all links that have “archive” to “newarchive.”
To make sure that all links with the word archive are included, we will need to match links starting with “archive” and links that start with archive but are also followed by another character, making the latter optional.
Match all links that begin with “/archive”
^/archive
Match all links that begin with “/archive/” and are followed by an expression making the character optional.
^/archive/?
The 10Web Redirect tool is case sensitive by default. In order to add case insensitivity to the regex for redirection, the following expression should be used:
(?i)^/archive/?
Redirecting a single PHP file.
^/archive\.php
Redirecting all PHP files in the archive.
^/archive/.*\.php
In this case the group character captures /amp/ and anything after that and /$1 refers to the first captured group. This will remove /amp/ and anything after that from the URL.
Redirect from: /(.*)/amp/
Redirect to: /$1
For example, yourdomain.com/blog/amp/read will redirect like this, yourdomain.com/blog
Important:
It is important to specify the string you are redirecting by using a slash, /. Not doing so may result in unwanted redirects.
If you run into an ERR_TOO_MANY_REDIRECTS error, this indicates that somewhere in your redirects, you have created a redirect loop. The main cause of this loop is not having a clearly defined end of a regex string.
For example, redirecting:
From ^/archive/file
To ^archive/file-one
will create a redirection loop because the from string does not have an end of string.
The correct solution is:
From ^/archive/file$
To ^archive/file-one
Using regex allows you to also include multiple URLs. For this case, one way to write the string is by using groups. Let's try to redirect two URLS:https://yourdomain.com/archive/file-one and https://yourdomain.com/archive/file-number-one.
^archive/file(-number)?-one
To look at this in detail, we want to redirect the URL starting with ^archive/file and we want to make sure that if it is followed by (-number)? that this too is an option and should be redirected. Lastly, we want it to also have the ending -one.
Import/Export redirect rules
With the 10Web redirect tool, you can import and export redirect rules. The tool also allows you to import bulk redirects. If you are looking for a specific redirect, you can use the search bar at the right of the page to find it.
Important:
A CSV file should be used to import redirect rules.
Before you begin, make sure that your file has the correct format. Each new redirect should start from a new line using the following format in the order that it is written:
- HTTPS status code should be at the beginning of the line (e.g. 301 or 302)
- The domain (e.g. yourdomainname.com)
- The URL that is being redirected
- The URL it is being redirected to
To import redirect rules using the 10Web redirect tool:
- Click on the website where you want to use the redirect
- Under Hosting Services > Redirects
- Click on Bulk Import
- Click on Choose file
- Choose the file you want to import and click Open>Import redirects
To export redirects using the 10Web redirect tool:
- Click on the website where you want to use the redirect
- Under Hosting Services, click on Redirects
- Click on Export to CSV
An automatic download of your redirects list to your PC will start.
Editing redirect rules
Each redirect rule has an edit icon and three stacked dots at its furthest right.
To edit a redirect, click on the edit icon, change the redirect rules as needed, and click Update Redirect.
To delete a redirect, click on the three dots and click Remove Redirect.