Plesk

How to redirect single domain webmail.example.com to another URL in Plesk?

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

  1. Login into Plesk.

  2. Go to Domains > example.com > Mail Settings and switch-off option Activate mail service on this domain.

  3. Go to Domains > example.com > DNS Settings and remove corresponding A record webmail.example.com. Press Update to update DNS zone.

  4. Create new domain webmail.example.com in Plesk > Domains > Add Domain.

  5. Go to Domains > webmail.example.com > Hosting Settings > Hosting type and set Hosting type as Forwarding. Set the desired URL as a destination address.

  6. Click OK.

  7. 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

  1. Connect via SSH.

  2. Disable Webmail service in domain example.com:

    # plesk bin domain_pref --update example.com -webmail none

  3. Get IP address for webmail.example.com DNS record type A included in example.com DNS zone:

    # plesk bin dns --info example.com | grep webmail
    webmail.example.com. A 203.0.113.2

  4. Remove webmail.example.com DNS record type A included in example.com DNS zone according to information provided in previous step:

    # plesk bin dns --del example.com -a webmail -ip 203.0.113.2

  5. In case Mail service will be managed externally, disable Mail service:

    # plesk bin site --update example.com -mail_service false

  6. 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