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?
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
.
- Login to Plesk
- In Websites & Domains click Add Domain:
- Select required webspace's (subscription's) name in Webspace section where forwarder need to be created:
- Specify the forwarder domain name in Registered domain name section:
- Select Forwarding in Hosting type section:
- In the Forwarding Settings box, type in the required destination address to redirect visitors to. Under Forwarding type, select Moved permanently (code 301) or Frame forwarding (difference between forwarding types is available here).
- Click Add Domain.
In the Service Provider view:
-
Go to Subscriptions > example.com.
-
Click Add Domain button.
-
Specify the following:
- Domain name
-
Under Hosting type, select the Forwarding option:
-
In the Forwarding Settings box, type in the destination address to redirect visitors to.
-
Under Forwarding type, select Moved permanently (code 301) or Frame forwarding (explanation of difference between forwarding types is available here).
-
Press the Add Domain button to complete domain creation.
Video-instruction:
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 "To make an existing domain a domain forwarder while keeping the website content (Linux only)".
-
Go to Domains > example.com > Hosting Settings.
-
Click the Change link next to the Hosting type field:
-
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) or Frame forwarding (difference between forwarding types is explained here).
-
-
Press the OK button to complete domain creation.
When it is required to redirect example.com hosted on another server to any other URL hosted on a Plesk server:
- Change the A record for example.com and www.example.com on name server side to point them to a Plesk server IP.
-
Create the same domain: Domains > Add New Domain > example.com
-
Go to Domains > example.com > Hosting Settings.
-
Click the Change link next to the Hosting type field:
-
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) or Frame forwarding (difference between forwarding types is explained here).
-
-
Press the OK button to complete domain creation.
-
Go to Domains > example.com > Apache & nginx Settings.
-
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/;
} -
Press the OK button to apply changes.
Comments
6 comments
Здравствуйте!
Как сделать редирект входа в панель управления?
Моя панель Admin Pelsk сейчас доступна по IP без SSL и по домену с SSL.
Мне необходимо чтобы была переадресация с ip на домен.
Либо предложите другой вариант защиты админки.
Спасибо!
Денис, добрый день, вот эта статья должна вам помочь.
Hey I want to redirect my domain mangastream.cc to mangapan.com but i can't see any option in my plesk panel where to redirect it. Also how can i change my root password? when i am going to change my root password the old password also works.
Our experience has been: this works for forwarding a non secured domain to a SSL-secured website only if the address is typed into the browser address bar as example.com or http://example.com, but not if entered as https://example.com. In that case, a security warning appears in the browser. It's a likely scenario for someone to retain https:// in the address bar, when they backspace and insert a new URL.
Even if we apply a permanent http to https redirect to the (non secured) domain, example.com or http://example.com successfully redirects to the https target website, without triggering a security warning.
This puzzles me: there is no content on the forwarding domain in transit & thus nothing that can be encrypted between browser and server. How is there a security risk? Why does the browser look for a certificate?
Is there a way to forward a domain, or use a domain alias, to redirect to a secured website (hosted on the same server):
- without triggering the security warning message, and
- without maintaining a (useless?) security certificate on a redirected domain?
We use Plesk Obsidian for Linux v18, Centos 8.
And if we have to use domain alias to achieve this (which will entail moving the forwarding domain to another subscription): can we move a domain without losing its mail accounts? I can't find a recently updated article on this.
Hello @Obaro Alidou K..
This error may appear when the 'location' directive was specified for HTTP/HTTPS (apache) and not for nginx. As the 4-th method says, it is needed to add the directives in Additional nginx directives
Please sign in to leave a comment.