Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Mail Subdomain added as alias to main domain in httpd.conf

Discussion in 'Bind / DNS / Nameserver Issues' started by nslave, Feb 27, 2017.

Tags:
  1. nslave

    nslave Member

    Joined:
    Feb 27, 2017
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Bulgaria
    cPanel Access Level:
    Reseller Owner
    Hi,
    I have a issue that I cannot seem to understand how to resolve. There are multiple domains hosted on the server and some of them experience this strange behavior. From time to time (I think it is when the httpd rebuild itself) some subdomains on some domains start to load the main domain. When I open, lets say mail.example.com, the page that it is loaded is example.com. When I look at the httpd.conf I see that mail.example.com is listed as an alias for example.com. When I remove it the issue is resolved but I am interested in how to resolve it permanently, because every time the httpd is rebuilt the issue arises again. Every domain is a separate account if it matters.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    This behavior is by-design as of cPanel version 60:

    Thank you.
     
  3. megahost

    megahost Member

    Joined:
    Jun 10, 2012
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi,

    i get the same problem, mail.mydomain.com is showing the contect of mydomain.com and my SEO guy asked me to fix that.
    Is there any way to fix that?

    thanks.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    You can manual remove the "mail" entry from the "serveralias" line in the following configuration files under the /var/cpanel/userdata/$username directory:

    /var/cpanel/userdata/$username/$domain.com
    /var/cpanel/userdata/$username/$domain.com_SSL


    Then, remove the .cache files for these domain names:

    /var/cpanel/userdata/$username/$domain.com.cache
    /var/cpanel/userdata/$username/$domain.com_SSL.cache


    Next, rebuild the Apache configuration file:

    Code:
    /scripts/rebuildhttpdconf
    However, keep in mind this is part of what allows SSL certificate validation for mail.domain.tld as part of the Domain TLS functionality:

    What is Domain TLS - cPanel Knowledge Base - cPanel Documentation

    Thank you.
     
  5. 4u123

    4u123 Well-Known Member
    PartnerNOC

    Joined:
    Jan 2, 2006
    Messages:
    801
    Likes Received:
    8
    Trophy Points:
    168
    This is causing a problem with the mail subdomain showing up in search engine results, even though the mail subdomain has never been linked to from anywhere.

    I'm sorry guys, but a subdomain that is not used for web content has no right being included in the Apache configuration, especially when it is a CNAME. This can cause all sorts of problems with SEO.

    We need an option to disable this in tweak settings please. ASAP

    You said...

    We made this change in order to simplify Mail SNI and SSL certificate management and reduce unnecessary mail client warnings.

    There are no "unnecessary" mail client warnings. Those warnings are legitimate This functionality is outdated anyway. Why use the mail subdomain at all when the main domain is already configured and will most likely be covered by an SSL cert anyway?

    Moving forward, you should be looking at dropping the mail and FTP subdomains completely, rather than trying to find a workaround that is impractical and could cause damage.

    This is completely unwanted and unnecessary.
     
Loading...

Share This Page