how to change domain.com/webmail to mail.domain.com

jmginer

Well-Known Member
Jul 26, 2006
150
4
168
Alicante
cPanel Access Level
Root Administrator
Make sure that the following setting is enabled in Main >> Server Configuration >> Tweak Settings: Proxy subdomains. This, along with some DNS A records, is all that is needed to make the feature work.
I've do it, dont take this option:

Non-SSL redirect destination > Hostname
SSL redirect destination > Hostname

But don't take effect.

when I go to

http://webmail.domain.com
it redirects to: https://webmail.domain.com
instead of: https://server.hostname.com on which I have a Comodo valid SSL
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,224
463

RWH Tech

Well-Known Member
Oct 1, 2015
86
16
8
Brazil
cPanel Access Level
Root Administrator
I have the same issue, only domain.com/cpanel, etc redirects to the proper place (SSL host), otherwise they go to cpanel.domain.com, which pops up a cert error.
The test domain has clean DNS records, with proxy domains autogenerated with /scripts/proxydomains
For example, cpanel A pointing to the server's IP, whm the same, etc.

This happens with either Always redirect to SSL or the settings OP mentioned.
Not a real big deal, because I've instructed users to use domain.com/cpanel and domain.com/webmail, etc.
 

RWH Tech

Well-Known Member
Oct 1, 2015
86
16
8
Brazil
cPanel Access Level
Root Administrator
Hi, Michael. There must be some anomaly on both mine and OP's install, since more people aren't posting about this. Of course, they could be using the domain.com/cpanel and don't see the issue. Pretty sure I saw this during my initial setup, so I opted to use the /cpanel, etc format.

The odd thing is that webmail. and cpanel. are broken, but webdisk. and cpcontacts. redirect just fine to the SSL.

I've double-checked the settings, even tried changing them around, saving, then testing with some random domains.
Cpanel. and webmail. always fail, webdisk. and cpcontacts. always work.


Always redirect to SSL [?] On
Proxy subdomains [?] On
Proxy subdomain creation [?] On
Thunderbird and Outlook autodiscover and autoconfig support (enables proxy subdomain and SRV record creation) [?] On
Overwrite custom A records used for proxy subdomains [?] On
Proxy subdomain override [?] Off
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,224
463
The redirect options found in "WHM >> Tweak Settings" are not designed for access attempts to proxy subdomains. To clarify, are you stating the behavior worked in the past but no longer functions as expected?

Thank you.
 

RWH Tech

Well-Known Member
Oct 1, 2015
86
16
8
Brazil
cPanel Access Level
Root Administrator
I see, so I'm missing something in my head.
This is a new setup, so the redirection I expected, which is as OP describes, never took place, save for webdisk.domain.com and cpcontacts.domain.com, which no one uses, so I just made sure my customers use domain.com/cpanel and domain.com/webmail
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,224
463
Thank you for taking the time to provide additional clarification. Note that it does appear to relate to the same issue discussed in this thread:

SSL for proxy subdomain or redirection?

As it stands, the current workaround is to disable proxy subdomains, and manually configure redirects for the subdomains to the proper SSL ports.

Thank you.
 

RWH Tech

Well-Known Member
Oct 1, 2015
86
16
8
Brazil
cPanel Access Level
Root Administrator
Seems like an improper implementation of the feature, which would be called a bug, then, because no one will want to use said proxy subdomains when they present certificate errors by default, and manually reconfiguring redirects per domain is infinitely impractical.

The horse is dead, but it's not my horse, since I've instructed my users to use domain.com/cpanel when I saw the behaviour described in this thread. Thanks for kicking it with me, though.