Disable http access to webmail on Shared host?

ravenelkira

Registered
Sep 12, 2018
2
0
1
India
cPanel Access Level
Website Owner
I'm on a shared hosting plan and I've applied an SSL certificate to the entire domain. I want to disable access to mydomain.com/webmail or atleast reroute it to https mydomain.com/webmail. Attempting a redirect such as this in cPanel says that it'll be an indefinite loop. I've tried multiple other ways to write redirect rules - http webmail traffic to https ://mydomainwebserver.com:2096 (server's mail server), but none of those work. Is there a way to achieve this without access to WHM as I have a shared hosting?

As a stopgap measure I've deleted mail.mydomain.com CNAME record and created a subdomain with the same name. Redirect rule from mail.mydomain.com to https ://mydomain.com/webmail works fine.
 
Last edited by a moderator:

ravenelkira

Registered
Sep 12, 2018
2
0
1
India
cPanel Access Level
Website Owner
Edit:
'I want to disable access to http /webmail or atleast reroute it to https /webmail'
'Redirect rule from mail.mydomain.com to https /webmail works fine.'
 

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,911
2,233
363
cPanel Access Level
DataCenter Provider
Twitter
Hello @ravenelkira,

You won't be able to override the aliases configured by default in Apache without root access to the server. However, you could send a request to your web hosting provider to see if they can setup a custom virtual host entry for your domain name to modify the default alias for /webmail. You can refer to the following forum thread for instructions on how to do so:

Change user or domain /cpanel /webmail /whm redirection

Thank you.