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
- Log into the Account Control Center (ACC)
- Click Domains in the left sidebar
- Click Manage Your Domain Names in the drop-down
- Under Domain Name, click the name of the domain you would like to redirect
- Across from Web Settings, click Manage Web Settings
- 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 File
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.
After you are finished, click Create File for new files or Save Changes if you already had a .htaccess.