How to Set Up a 301 Redirect

Legacy Content

This is Legacy Content. For up-to-date tutorials and information, see our current knowledge base.

FTP

Basic

Advanced

Webmaster

Developer

Commerce

Commerce Pro

High Volume

What is a 301 Redirect?  

A 301 redirect is a way to permanently reroute traffic from an old URL to a new one. If a business is moving to a new website, it might be hard to reach all the customers about the change (and even harder to get them to remember).

A 301 redirect solves the problem by rerouting all the traffic from the old URL to the new one. So customers who accidentally go to the old site will automatically end up at the new one, even though the URLs differ.

You can add 301 redirects for single pages or entire domains. All you have to do is add a line into your .htaccess file. This is easy to do in the ACC. Just follow the steps below:

Accessing Your .htaccess File

  1. Log into the Account Control Center (ACC)
  2. Click Domains in the left sidebar
  3. Click Manage Your Domain Names in the drop-downmanage your domains
  4. Under Domain Name, click the name of the domain you would like to redirectdomain name image
  5. Across from Web Settings, click Manage Web Settingsweb settings image
  6. If you have never created a .htaccess file before, click Create a .htaccess File. If you already have a .htaccess file, click View or Edit Your .htaccess Filehtaccess image

Leave the filename as-is. It must remain .htaccess in order to work.

Adding a 301 Redirect  

To set up the redirect, you will need to add a few lines into the .htaccess file. See the example lines below and add the lines that best fit your situation.

To 301 Redirect a Single Page:

Redirect 301 /old-file.html http://www.domain.com/new-file.html

Add this line to your .htaccess. Replace old-file.html with the file name of the page you want to be redirected. If the file is not in the top-level of the directory, then include the file path in front of the /old-file.html.

Replace http://www.domain.com/new-file.html with the URL you want the page redirected to.

To 301 Redirect an Entire Domain:

Redirect 301 / http://www.new-domain.com/

Replace http://www.new-domain.com/ with the URL that you would like your site to redirect to.

Be sure to add a blank line at the end of your .htaccess document. This signals to the server that it has reached the end of the .htaccess file.

After you are finished, click Create File for new files or Save Changes if you already had a .htaccess.

Updated on April 24, 2019

Was this article helpful?

Related Articles