How do I redirect my site?


When you move a page, you can set up a redirect, so that visitors will be sent to the new page from the old address.

For example, if you move www.your-domain.com/shop.html to www.your-domain.com/shop/, you can set up a redirect so that any visitor that still goes to shop.html will be automatically redirected to /shop/.

To set up a redirect, you need to edit your .htaccess file, which you can find in your public_html directory.  If it does not exist, you may need to create one in your text editor.

To set up a redirect:

  1. Download your .htaccess file from your website
  2. Open it in a text editor, or create a new file in your text editor
  3. Type in the following line:

redirect 301 /shop.html http://www.your-domain.com/shop/

  1. Repeat as needed to cover all your files
  2. Save your .htaccess file
  3. Upload onto your site

Another use of a redirect is if you want to make certain people go to www.your-domain.com instead of just your-domain.com. This might come in with search engine results or marketing campaigns.

To point people to www.your-domain.com:

  1. Download your .htaccess file from your website
  2. Open it in a text editor
  3. Add in the following lines:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^your-domain.com
RewriteRule (.*) http://www.your-domain.com/$1 [R=301,L]

  1. Save your .htaccess file
  2. Upload onto your site


Article ID: 484
Created On: Tue, Mar 17, 2015 at 3:45 PM
Last Updated On: Thu, Apr 23, 2015 at 12:48 PM

Online URL: https://www.heartinternet.uk/support/article/how-do-i-redirect-my-site.html