1. Home
  2. Account Control Center
  3. How to Set Up a 301 Redirect

How to Set Up a 301 Redirect

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:

If you have a WP Professional or WP Enthusiast hosting account, 301 redirects will be configured differently. Go to the WP Hosting 301 Redirects section to see how we recommend setting one up.

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 an .htaccess file before, click Create an .htaccess File. If you already have a .htaccess file, click View or Edit Your .htaccess Filehtaccess image

 Leave the file name 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 an .htaccess.

WP Hosting 301 Redirects

Basic Users

Create redirects by adding the Simple 301 Redirect plugin to your site. Follow these steps:

  1. Go to the WordPress plugin directory and search for "Simple 301 Redirect"plugins image
  2. Click the Install Now button in the plugin's boxinstall image
  3. Click the Activate button after the plugin has finished installing
    activate image
  4. Click Settings, then click 301 Redirects in the drop-down
    301 redirect image
  5. Under Request, enter the file name of the page you want redirected
  6. Under Destination, enter the URL that you want the page to be redirected to

    If you need more format the file name and URL for the redirect, click the Documentation link at the bottom of the page.

    301 redirect image
  7. Click Save Changes

Advanced Users

For more advanced WordPress users, the PHP header can be edited to create a redirect. Check out the wp_redirect feature’s WordPress documentation to see how this works.

Updated on October 26, 2018

Was this article helpful?

Related Articles