1. Knowledge Base
  2. >
  3. Results
  4. >
  5. Redirects in Plesk - Windows Shared

Redirects in Plesk - Windows Shared

 

Use the instructions below to redirect a domain in Plesk for Windows Shared and Dedicated hosting.

WARNING! Before performing any of the following steps, it is recommended that you make a backup of your account. Unfortunately, when you select forwarding in Plesk, all settings and content are deleted from the server. Without a backup, there will be no way to restore anything that has been deleted.
 
Note: This example is using Plesk 18. The steps will be the same for other versions of Plesk; however, the button locations may be different.


Add a New Domain Forwarder

To add a new domain forwarder:

  1. If you are subscribed to several hosting packages and have access to several web spaces associated with your account, select the required webspace in the Subscription menu at the top of the screen.
  2. Click the Websites & Domains tab.

    Plesk Website and Domains

  3. Click Add New Domain.

    Plesk addon domain

  4. Specify the following:
    1. In the Domain name box, type the domain name that you have registered with your service provider or a domain name registration company.
    2. Under Hosting type, select the Forwarding option.
    3. Make sure to check tick the boxes for  Activate the DNS Service and Activate the  Mail Service boxes.
    4. In the Destination address box, type the Internet address to which you want to redirect visitors.
    5. Under Forwarding type, select the preferred type of forwarding. With standard forwarding, a user is redirected to the site, and the actual site's address is shown in the user's browser, so the user always knows that he or she is redirected to another address. With frame forwarding, a user is redirected to the site without knowing that the site actually resides at another location; therefore, frame forwarding should be preferred.
  5. Click OK.

    Adding new domain forwarder



Create a Domain Forwarder with an Existing Domain

To reconfigure an existing domain and make it a domain forwarder:

  1. Go to the Websites & Domains tab.

    Plesk Websites and Domains

  2. Select Hosting Settings next to the preferred domain.

    Plesk hosting settings

  3. Click the [Change] link next to the Hosting type field.

    Plesk hosting type

  4. Specify the following:
    1. Under Hosting type, select the Forwarding option.
    2. In the Destination address box, type the Internet address to which you want to redirect visitors.
    3. Under Forwarding type, select the preferred type of forwarding. With standard forwarding, a user is redirected to the site, and the actual site's address is shown in the user's browser, so the user always knows that he or she is redirected to another address. With frame forwarding, a user is redirected to the site without knowing that the site actually resides at another location; therefore, frame forwarding should be preferred. 

      Change hosting type

  5. Click OK.

How to Add a New Subdomain Forwarder

To add a new subdomain forwarder:

  1. If you are subscribed to several hosting packages and have access to several web spaces associated with your account, select the required webspace in the Subscription menu at the top of the screen.
  2. Click the Websites & Domains tab.

    Plesk Website and Domains

  3. Click Add Subdomain.

    Plesk subdomain

  4. Specify the following:
    1. Let us create a subdomain first.
    2. In the Subdomain name box, type the subdomain name that you wish to create.

      Add new subdomain

    3. Once the subdomain has been added, click on Hosting Settings.

      subdomain hosting settings

    4. Under Hosting type, click change.

      hosting type

    5. Select the Forwarding option.

      hosting settings

    6. In the Destination address box, type the Internet address to which you want to redirect visitors.

      domain forwarding setup

    7. Under Forwarding type, select the preferred type of forwarding. With standard forwarding, a user is redirected to the site, and the actual site's address is shown in the user's browser, so the user always knows that he or she is redirected to another address. With frame forwarding, a user is redirected to the site without knowing that the site actually resides at another location; therefore, frame forwarding should be preferred.
  5. Click OK.
Note: Steps 4-7 are the same steps to follow if you are going to create a forwarder to an existing subdomain.

 

Creating a 301 Redirect via a Web.config File

There are a few options for configuring a 301 redirect via a web.config file. The web.config file is typically located in the document root folder of your website. This file can be created if one does not already exist. A basic web.config file would contain the following configuration:

<?xml version="1.0" encoding="utf-8" ?>

<configuration>

<system.web>  </system.web>  <system.webServer>

</system.webServer> </configuration> 

 

Note Improper formatting of the web.config file can result in a 500 Internal Server Error. A backup of the file should be created prior to editing.

The following entry can be appended to your web.config file to redirect an entire site or directory to a new location. For example, if you want http://example.com/olddir/ redirected to http://domain.com/ then open, or create, a web.config file in the ‘/olddir’ folder, and add the following line of code within the <system.webServer> section:

<httpRedirect enabled="true" destination="http://domain.com/" httpResponseStatus="Permanent" /> 

 

The following example is intended for redirecting a single page to a new location. For example, important pages of your site have .html extensions, and you want the new location to be its own directory, such as http://example.com/contact.html will change to http://example.com/contact/:

<configuration>

<location path="contact.html">

<system.webServer>

<httpRedirect enabled="true"

destination="http://example.com/contact"

httpResponseStatus="Permanent" />

</system.webServer>

</location>

<location path="about.html">

<system.webServer>

<httpRedirect enabled="true"

destination="http://example.com/about"

httpResponseStatus="Permanent" />

</system.webServer>

</location>

</configuration> 

 

If you need help with configuring a 301 redirect within your web.config file, then please contact us via phone or Live Chat for assistance.