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.

ServerAlias and ServerName are Backwards in httpd.conf

Discussion in 'General Discussion' started by zelf, Jun 10, 2009.

  1. zelf

    zelf Active Member

    Joined:
    Dec 6, 2005
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    The ServerName should be "www.domain.tld"
    The ServerAlias should be "domain.tld"

    Why is every account setup as ServerName "domain.tld" and ServerAlias "www.domain.tld"? This means that if someone just types in domain.tld without the "www" they will get a cpanel screen rather than your site.

    How can this be changed???? I have looked at several threads with no answer. If you know where the thread is that fixes this absolutely please point me to it.
     
  2. PlatinumServerM

    PlatinumServerM Well-Known Member
    PartnerNOC

    Joined:
    Jul 10, 2005
    Messages:
    397
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    New Jersey, USA
    cPanel Access Level:
    Root Administrator
    The ServerName does not include the www. It's the ServerAlias that does include the www in it. That virtualhost will respond to whatever is in the ServerName and the ServerAlias line the same way.
     
  3. zelf

    zelf Active Member

    Joined:
    Dec 6, 2005
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    When http.conf reads

    ServerName domain.tld
    ServerAlias www.domain.tld

    and a user types in domain.tld they get a cPanel default screen. When the user types www.domain.tld they get the website. How do I change httpd.conf permanently so that it reads:

    ServerName domain.tld
    ServerAlias *.domain.tld

    or has the behavior of when a user types in either domain.tld or www.domain.tld they get the website and not the default cPanel screen.
     
  4. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    From your initial post it sounds like you have something else ( configuration maybe ) causing the issue. Please open a support ticket and our techs will gladly help you sort the issue.
     
  5. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    I agree with cpanelkenneth on this one as what you describe is not typical
    normal behavior and you definitely have something else going on here.

    Normally on any cpanel system, both the base domain and the "www."
    will BOTH reach the very same web address.

    It's just a guess here but I'm thinking you might have a DNS issue instead
    of an Apache configuration issue although it could be centered in Apache.

    Are you using CNAME or A records in your DNS zones?

    Anyway, if you can't solve it from this information, I would suggest either
    opening up a support ticket with Cpanel or your server host provider or
    contacting me or one of the other server administration specialists that
    hang around this place to give you a hand with that particular issue.
     
  6. zelf

    zelf Active Member

    Joined:
    Dec 6, 2005
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    Maybe it is the DNS. I am not using my server for DNS. I am using a 3rd party to handle name server services. Yes my domain.tld is an A record. Because I am not using DNS and have it disabled on my server how do I fix this issue?
     
Loading...
Similar Threads - ServerAlias ServerName Backwards
  1. itmangeo
    Replies:
    1
    Views:
    203

Share This Page