Question
How to redirect single domain webmail.example.com to another URL in Plesk?
Answer
This functionality is not implemented in Plesk. A feature request exists in plesk.uservoice.com.
The top-ranked suggestions are likely to be included in the next versions of Plesk.
As a workaround, apply one of solutions below:
Solution via Plesk GUI
-
Go to Domains > example.com > Mail Settings and switch-off option Activate mail service on this domain.
-
Go to Domains > example.com > DNS Settings and remove corresponding A record webmail.example.com. Press Update to update DNS zone.
-
Create new domain webmail.example.com in Plesk > Domains > Add Domain.
-
Go to Domains > webmail.example.com > Hosting Settings > Hosting type and set Hosting type as Forwarding. Set the desired URL as a destination address.
-
Click OK.
- Go to Domains > example.com > Mail Settings and switch on option Activate mail service on this domain.
Solution using external Webmail service
Solution via command line
-
Connect via SSH.
-
Disable Webmail service in domain
example.com
:# plesk bin domain_pref --update example.com -webmail none
-
Get IP address for
webmail.example.com
DNS record type A included inexample.com
DNS zone:# plesk bin dns --info example.com | grep webmail
webmail.example.com. A 203.0.113.2 -
Remove
webmail.example.com
DNS record type A included inexample.com
DNS zone according to information provided in previous step:# plesk bin dns --del example.com -a webmail -ip 203.0.113.2
-
In case Mail service will be managed externally, disable Mail service:
# plesk bin site --update example.com -mail_service false
-
Create
webmail.example.com
with forwarding hosting type as domain or subdomain:-
To create
webmail.example.com
as domain:# plesk bin site --create webmail.example.com -webspace-name example.com -mail_service false -hosting true -hst_type std -target_url http://example.info
-
To create
webmail.example.com
as subdomain:# plesk bin site --create webmail.example.com -parent-domain-name example.com -mail_service false -hosting true -hst_type std -target_url http://example.info
-