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:
    37,204
    Likes Received:
    1,297
    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:
    37,204
    Likes Received:
    1,297
    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.
     
Loading...

Share This Page