Skip to main content

Change webmail.domain.com to mail.domain.com in WHM&cPanel

Comments

4 comments

  • cPRex Jurassic Moderator
    Hey there! Unfortunately there is not an easy way to do that inside cPanel. cPanel specifically programs the existing proxy subdomains of cpanel, whm, webmail, autoconfig, autodiscover, cpcalendars, cpcontacts, and webdisk directly into the Apache and DNS configurations. In order to change this, you would need to make manual configuration changes to the Apache template system, and also adjust the DNS templates so those zone get created automatically. While I don't have specific instructions for that work, documentation on Apache templates can be found here:
    0
  • MotazHakim
    Hello There's an easy way, since cPanel/WHM is not giving an easy way to do it using a .htaccess file with the below code: [CODE=php]RewriteCond %{HTTP_HOST} ^ mail.theirdomain.com [NC,OR] RewriteRule ^(.*)$ https://webmail.domain.com/$1 [L,R=301,NC]
    and put it in [CODE=bash]/home/accountname/public_html/
    so the file will be at [CODE=bash] /home/accountname/public_html/.htaccess
    then clear browser cache then now try to access mail.theirdomain.com then you will find it redirect the customer automatically to webmail.domain.com No need to do any edit. Try it and send feedback;)
    0
  • mlopez
    Hello There's an easy way, since cPanel/WHM is not giving an easy way to do it using a .htaccess file with the below code: [CODE=php]RewriteCond %{HTTP_HOST} ^ mail.theirdomain.com [NC,OR] RewriteRule ^(.*)$ https://webmail.domain.com/$1 [L,R=301,NC]
    and put it in [CODE=bash]/home/accountname/public_html/
    so the file will be at [CODE=bash] /home/accountname/public_html/.htaccess
    then clear browser cache then now try to access mail.theirdomain.com then you will find it redirect the customer automatically to webmail.domain.com No need to do any edit. Try it and send feedback;)

    Great hack, but if @cuongvttt wanted to make the change server wide it could be annoying.
    0
  • devil2580
    hi Hope you are well Please check the following link to look into this matter. URL: How to change webmail.domain.com to mail.domain.com in cPanel | DigitalOcean Feel fee to contact us for more support
    0

Please sign in to leave a comment.