mail.domain.com open main website

rbairwell

Well-Known Member
May 28, 2022
108
47
28
Mansfield, Nottingham, UK
cPanel Access Level
Root Administrator
For some reason, cPanel thinks that mail.* is a domain alias for your main website: to be honest, I'm not sure how to fix this from within cPanel: but I know it could be fixed via root access via WHM/SSH: do you have access to either of those?

In the interim, I would recommend putting in a .htaccess redirect file such as:
Code:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond "%{HTTP_HOST}"   "!^www\.arabwindow\.net" [NC]
RewriteCond "%{HTTP_HOST}"   "!^$"
RewriteRule "^/?(.*)" "https://www.arabwindow.net/$1" [L,R,NE]
</IfModule>
which will redirect any and all requests that hit your website which are NOT going to https:// www. arabwindow.net to that domain name. Hope it helps!
 
  • Like
Reactions: fajryassin

fajryassin

Member
Oct 5, 2014
11
0
128
Beirut, Lebanon, Lebanon
cPanel Access Level
Root Administrator
Twitter
this solution solves my issue.

But, If we can solve it from whm to all sites it is great
thank you

For some reason, cPanel thinks that mail.* is a domain alias for your main website: to be honest, I'm not sure how to fix this from within cPanel: but I know it could be fixed via root access via WHM/SSH: do you have access to either of those?

In the interim, I would recommend putting in a .htaccess redirect file such as:
Code:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond "%{HTTP_HOST}"   "!^www\.arabwindow\.net" [NC]
RewriteCond "%{HTTP_HOST}"   "!^$"
RewriteRule "^/?(.*)" "https://www.arabwindow.net/$1" [L,R,NE]
</IfModule>
which will redirect any and all requests that hit your website which are NOT going to https:// www. arabwindow.net to that domain name. Hope it helps!
 
Last edited:

cPanelWilliam

Administrator
Staff member
Mar 13, 2018
169
28
153
Houston
cPanel Access Level
Root Administrator
  • Like
Reactions: fajryassin