301 redirect

123-reg hosting icon

This FAQ will help you to set up a 301 Redirect on your hosting package

The below instructions will show you how you can create a redirect using your .htaccess file.


If you have a 123 Reg Linux hosting package with a domain you can set up a 301 redirect using a .htaccess file. This will catch any traffic on your old site and redirect it to your the index of your new site.

Here's how to set up a 301 redirect:

1

Open up a text editor such as "Notepad".

2

Copy the following line of code into your text editor, replacing http://www.example.com/ with the URL you wish to forward your domain name to.

Redirect 301 / http://www.example.com/
3

Save the file as .htaccess.

4

Upload the file to your web space.


How to redirect www to non www version of site

To force your site to always show the non-www URL, please do the following:

1

Open up a text editor such as "Notepad".

2

Copy the following line of code into your text editor, replacing http://www.example.com/ and example\.com with your domain name.

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^example\.com
RewriteRule (.*) http://example.com/$1 [R=301,L]
3

Save the file as .htaccess.

4

Upload the file to your web space.