Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Dec 2005
    Posts
    30

    Thumbs down ServerAlias and ServerName are Backwards in httpd.conf

    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. #2
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jul 2005
    Location
    New Jersey, USA
    Posts
    397

    Default

    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. #3
    Member
    Join Date
    Dec 2005
    Posts
    30

    Default

    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. #4
    cPanel Development cpanelkenneth's Avatar
    Join Date
    Apr 2006
    Posts
    3,768
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    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.
    Kenneth
    Product Development
    cPanel, Inc.

  5. #5
    BANNED
    Join Date
    Jun 2005
    Location
    Wild Wild West
    Posts
    2,025

    Lightbulb

    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. #6
    Member
    Join Date
    Dec 2005
    Posts
    30

    Default

    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?

Similar Threads & Tags
Similar threads

  1. ServerName and ServerAlias values reversed in httpd.conf when adding new account
    By mwmconsulting in forum cPanel and WHM Discussions
    Replies: 8
    Last Post: 08-12-2010, 10:35 AM
  2. Using www. in ServerName - httpd.conf ?
    By trevHCS in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-20-2008, 01:22 PM
  3. ServerName and ServerAlias swapped over in httpd.conf :(
    By girishn in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 09-07-2007, 08:11 AM
  4. Addon Domain Problem - Serveralias not added to httpd.conf
    By mydomain in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 11-23-2004, 06:57 PM
  5. addon domains, swap servername/serveralias
    By rmj in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 03-01-2003, 03:53 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube