Articles in this section

How to create a domain forwarder in Plesk?

Plesk for Windows kb: how-to Plesk for Linux

Applicable to:

  • Plesk for Linux
  • Plesk for Windows

Question

  • How to set up domain forwarding in Plesk?
  • How to redirect a domain to Document Root (or subfolder) of another domain?
  • How to set up masked domain redirection in Plesk?
  • How to set up masked frame forwarding for a domain in Plesk?

Answer

One or more registered domain names can be pointed to the same physical website by using domain name forwarding. This allows automatic redirection of visitors from the URL they specify in a browser to a site with a different URL. For example, visitors of the site example.com can be redirected to example.org.

Create a brand new domain forwarder in Plesk
  1. Login to Plesk
  2. In Websites & Domains click Add Domain:
    mceclip3.png
  3. Select required webspace's (subscription's) name in Webspace section where forwarder need to be created:
    mceclip5.png
  4. Specify the forwarder domain name in Registered domain name section:
    mceclip6.png
  5. Select Forwarding in Hosting type section:

  6. In the Forwarding Settings box, type in the required destination address to redirect visitors to. Under Forwarding type, Moved permanently (code 301) (changes the domain in the browser URL) or Frame forwarding (keeps the domain in the browser URL unchanged)

    Note: The difference between forwarding types is explained here

    mceclip4.png
  7. Click Add Domain.

In the Service Provider view:

  1. Log in to Plesk.

  2. Go to Subscriptions > example.com.

  3. Click Add Domain button.

  4. Specify the following:

    • Domain name
    • Under Hosting type, select the Forwarding option:
      mceclip0.png

    • In the Forwarding Settings box, type in the destination address to redirect visitors to.

    • Under Forwarding type, Moved permanently (code 301) (changes the domain in the browser URL) or Frame forwarding (keeps the domain in the browser URL unchanged)

      Note: The difference between forwarding types is explained here

  5. Press the Add Domain button to complete domain creation.

Video-instruction:

Convert an existing Plesk domain to a domain forwarder

Warning: this way will remove all website data, so, it is recommended to create a domain backup first.

If it is required to keep the website content but create a redirect to another website, go to the article section "Make an existing domain a domain forwarder while keeping the website content (Linux only)".

  1. Log in to Plesk.

  2. Go to Domains > example.com > Hosting & DNS > Hosting

  3. Specify the following:

    • Under Hosting type, select the Forwarding option:

    • In the Destination address box, type the URL address to which you want to redirect visitors.

    • Under Forwarding type, select Moved permanently (code 301) (changes the domain in the browser URL) or Frame forwarding (keeps the domain in the browser URL unchanged)

      Note: The difference between forwarding types is explained here

  4. Press Save

Make an existing domain hosted externally send visitors to a site hosted on another server via Plesk forwarding

When it is required to redirect example.com hosted on another server to any other URL:

  1. Change the A record for example.com and www.example.com within their external primary DNS zone and point them to a Plesk server IP.
  2. Log in to Plesk.

  3. Create the same domain: Domains > Add New Domain > example.com

  4. Go to Domains > example.com > Hosting & DNS > Hosting
  5. Specify the following:
    • Under Hosting type, select the Forwarding option:

    • In the Destination address box, type the URL address to which you want to redirect visitors.

    • Under Forwarding type, select Moved permanently (code 301) (changes the domain in the browser URL) or Frame forwarding (keeps the domain in the browser URL unchanged)

      Note: difference between forwarding types is explained here

  6. Press the OK button to complete domain creation.

Make an existing domain a domain forwarder while keeping the website content (Linux only)
  1. Log in to Plesk.

  2. Go to Domains > example.com > Apache & nginx Settings.

  3. Add the following rows to the Additional nginx directives field to redirect visitors of example.com to example.net:

    CONFIG_TEXT: location = / {
    return 301 https://example.net/;
    }

  4. Press OK

OR (for a Plesk server that has only Apache enabled)

  1. By using the Plesk File Manager, rename the current .htaccess file in the main directory of the domain to .htaccess-bak.
  2. While still in the Plesk File Manager, create a brand new .htaccess file within the main directory of the website and make sure that it includes only the following content to redirect visitors of example.com to example.net:

    CONFIG_TEXT: RewriteEngine on
    RewriteRule ^(.*)$ https://example.net/$1 [R=301,L]

  3. Press Save

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.