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.

Web Site Configuration - does it have to be www.[domain name]?

Discussion in 'General Discussion' started by kallanp, Aug 28, 2013.

  1. kallanp

    kallanp Member

    Joined:
    Jul 13, 2013
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    When I create a new account in WHM and assign a domain (eg "mydomain.com"), it will always create a web site which by default will be accessed on "www.mydomain.com".

    I cannot see anywhere in WHM/CPanel where is this is configured - it is always just is. I am using this primarily for web site development, so I do not need or desire my web sites to always have to be http://www.xxxxxxxxxx. So is there anywhere in WHM/CPanel to configure the URLs by which a web site respond without going into .htaccess and the like.

    It seems to me that for a product called "web hosting manager" and cpanel there isn't a much to configure the web site whereas there is plenty of functions to configure domains, databases and emails.

    Can somebody explain? Am I missing something? Is there any way to configure a web site to respond to a URL of my choosing (without adding "www") through just WHM/cpanel without having to resort to additional tricks in .htaccess?
     
  2. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    No, you can access the site both ways, with and without "www".

    The site itself is created using the domain, (i.e. without "www"), and the "www" is added to the DNS zone of the domain, as a CNAME.
    Code:
    domain.com.  14400  IN  A  <IP_ADDRESS_OF_THE_SITE>
    www          14400  IN  CNAME  domain.com. 
    
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    The "www" CNAME entry is configured by default. You can remove or modify this entry via:

    "WHM Home » DNS Functions » Edit DNS Zone"

    Thank you.
     
  4. kallanp

    kallanp Member

    Joined:
    Jul 13, 2013
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi

    >> The "www" CNAME entry is configured by default. You can remove or modify this entry via:<<

    I am asking more about the web site configuration. Is the Virtual Host in the Apache configuration automatically set up to respond to www.<domain name> (where "<domain name>" is the primary domain for the account)?

    I am actually using an external DNS so I know about setting up A records etc to point to the web site.

    Kallan
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Yes, the following entry is added to the VirtualHost for the domain name by default:

    Code:
    ServerAlias www.example.com
    You can edit the default template for all VirtualHosts with the instructions at:

    Default Templates - Apache Configuration

    Thank you.
     
Loading...

Share This Page