There are a variety of ways of redirecting visitors from one domain or page to another. 301 redirects are the style of HTTP redirect that is both user and search engine friendly. 301 redirects are a signal to search engines that a particular website or page has moved permanently to another URL. For example, if you were rebranding your old business (oldbusiness.com) to new business (newbusiness.com) you would want to forward the old domain to the new one using a 301 redirect.

For each type of redirect described in this article to work (except for a manual redirect) you must ensure that your domain name is configured to use our DNS hosting, which is included with our hosting plans, otherwise you will need to also manually create a DNS record in the control panel at your DNS hosting company.

How to create a 301 redirect

There are a number of ways that you can setup a 301 redirect, including using an .htaccess file, php, javascript, perl, etc. It’s also important to recognize that 301 redirects can also be used to redirect individual pages and not just entire websites. The following options are available to you:

  1. Domain Aliasing (can forward domain to domain)
  2. Domain Forwarding (can forward domain to URL)
  3. Subdomain Forwarding (can forward subdomain to URL)
  4. Redirecting with .htaccess (can forward any URL to any URL)

Domain Alias

If you’re forwarding an entire domain to another (like mydomain.com to mynewdomain.com), the simplest way to do this in Plesk is to simply add it as a domain alias — Plesk will automatically ensure that it sets up a 301 redirect for you.

  1. Login to Plesk and choose the Add Domain Alias button
  2. Enter the domain you wish to forward and then select the domain you wish to forward it to
  3. Leave all check boxes at their defaults. If you do not wish to forward mail, un-check the “Mail Service” box.
  4. Choose the OK button to save your settings

Your domain -> domain redirect is now in place.

Domain Forwarding

  1. If you have not yet added the domain in Plesk, login to Plesk and choose the Add Domain button, enter the domain name, then if you see the option to select the “Hosting Type”, select Forwarding
  2. If the domain already exists in Plesk or if you did not see the option to select the “Hosting Type” in step 1, find your domain in the list in Plesk, then click “Hosting Settings“. Look just below the domain name and you’ll see “Hosting Type” with a link to change it. Click that link and you’ll be presented with the option to select Forwarding (do that)
  3. Enter the destination URL
  4. Choose the forwarding type / response code. Be sure to select carefully. If there’s any point in the future where you may wish to remove this forward, it’s recommended to choose “Moved Temporarily,” otherwise you should choose “Moved Permanently”. Frame forwarding is typically not recommended.
  5. Click OK to save your settings.

Your domain -> URL redirect is now in place.

Domain Forwards in Plesk do not presently benefit from Let’s Encrypt SSL. This Knowledgebase Article describes the issue and the solution. Using a Domain Alias avoids this problem as you can cover it with the primary SSL Certificate.

Subdomain Forwarding

If you’d like to forward a subdomain to another URL, here’s how to do so in Plesk 11.5 and newer:

  1. Login to Plesk and choose the Add Subdomain button
  2. Enter your subdomain and leave the default settings as is.
  3. Press OK to create the subdomain
  4. Under the Subdomain’s settings, choose Hosting Settings
  5. Look for “Hosting type” then select the Change link beside “Website”
  6. In the drop down menu beside “Hosting Type” choose Forwarding
  7. Enter the destination address and Press OK to save the settings.

Your subdomain -> URL redirect is now in place.

.htaccess redirects

You’ll want to set up a manual redirect in your .htaccess file if you wish to redirect one URL to another such as mydomain.com/subfolder to mydomain.com/newfolder. Many content management systems like WordPress have great plugins to make this easier to manage, although redirecting using the .htaccess file will be fractions of a second faster than using those plugins.

Feel free to use the following lines if you are setting up your own .htaccess 301 redirects. Be sure to replace ‘yournewsite.com’ with your actual new domain.

# Redirect everything:
RewriteEngine on
RewriteCond %{REQUEST_URI} !^.well-known/acme-challenge
RewriteRule ^(.*) https://yournewsite.com$1 [R=301,L]

# Redirect specific pages (use this OR the everything rule above. NOT BOTH):
redirect 301 / http://yournewsite.com/
redirect 301 /oldpage/ http://yournewsite.com/newpage/
redirect 301 /oldpage.html http://yournewsite.com/newpage/
In this video we look at using an .htaccess file in the Plesk (old version 9) File Manger to create 301 redirects, however Plesk 10 and 11 both have a file manager that behaves very similar to the one in Plesk 9.

If you’re not hosted with us, consider moving on over! Check out our shared hosting or Plesk VPS hosting options.

About Adam Bate

Adam is a former owner of Websavers Inc. He departed in 2014 to focus his time entirely on blogging and online marketing. Adam currently works for a Clagary and Edmonton based web marketing agency.

Leave a Comment