Results 1 to 11 of 11

Thread: www not working

  1. #1
    Member
    Join Date
    Oct 2004
    Posts
    32

    Default www not working

    Hi everyone,
    I have a customer that for some reson his website cannot be displayed when using the www in front of his domainname. When he only uses http:// and no www, his website displays without a problem. Do you know what may be wrong? I checkd if the www redirection file was created and it was:

    lrwxrwxrwx 1 judits judits 11 Apr 6 20:20 www -> public_html/

    Thanks

  2. #2
    Member
    Join Date
    Oct 2004
    Posts
    32

    Default

    It's weird. It's working now. I didn't do anything.

  3. #3
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Apr 2008
    Location
    PK
    Posts
    443

    Default

    Quote Originally Posted by Voltio View Post
    lrwxrwxrwx 1 judits judits 11 Apr 6 20:20 www -> public_html/
    The existence of this link does not determine whether a site will load with www or not on a cPanel server.

    Quote Originally Posted by Voltio View Post
    It's weird. It's working now. I didn't do anything.
    It is most probably DNS related. You could do a simple 'ping www.yoursite.com' from your computer next time to see if its DNS related or not. Glad it is working for you now.
    1 solution works for all problems. Trying harder!
    HostMasterTips - Understanding Tech Support

  4. #4
    Member B12Org's Avatar
    Join Date
    Jul 2003
    Location
    Seattle Washington
    Posts
    694

    Default

    Quote Originally Posted by JawadArshad View Post
    The existence of this link does not determine whether a site will load with www or not on a cPanel server.
    What does determine if the site will load with www or not on a cpanel server? (external to dns)
    Enom ETP - If you need a reseller account (or retail) contact me!

  5. #5
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Apr 2008
    Location
    PK
    Posts
    443

    Default

    Quote Originally Posted by B12Org View Post
    What does determine if the site will load with www or not on a cpanel server? (external to dns)
    ServerAlias settting in the VirtualHost of any site (in apache configuration file) contains www.domain.tld by default. This ensures www.domain.tld loads the same contents as domain.tld.
    1 solution works for all problems. Trying harder!
    HostMasterTips - Understanding Tech Support

  6. #6
    Member B12Org's Avatar
    Join Date
    Jul 2003
    Location
    Seattle Washington
    Posts
    694

    Default

    is there a setting in cpanel that you can use to disable www or to enable it after domain creation - additionally is that setting present when creating a domain or is always assumed that both @none and www will be required and is thus setup ?
    Enom ETP - If you need a reseller account (or retail) contact me!

  7. #7
    cPanel Staff cPanelJared's Avatar
    Join Date
    Feb 2010
    Location
    Houston, TX
    Posts
    1,461
    cPanel/WHM Access Level

    Root Administrator

    Default No such setting

    Quote Originally Posted by B12Org View Post
    is there a setting in cpanel that you can use to disable www or to enable it after domain creation - additionally is that setting present when creating a domain or is always assumed that both @none and www will be required and is thus setup ?
    There is no option for this in cPanel. By default, with no option to override, the virtual host in the httpd.conf file is defined as the domain name only, with a ServerAlias directive for www followed by the domain name.
    For hands-on assistance, please reference our new support information page: Where should I go for support?
    cPResources: Support Options - Submit a ticket here - Additional Support Options - Forums Search - Mailing Lists(Alt) - Documentation - Find cPanel hosting


    -- Jared Ryan, Technical Analyst, cPanel Technical Support

  8. #8
    cPanel Staff cPanelJared's Avatar
    Join Date
    Feb 2010
    Location
    Houston, TX
    Posts
    1,461
    cPanel/WHM Access Level

    Root Administrator

    Default

    Quote Originally Posted by Voltio View Post
    Hi everyone,
    I have a customer that for some reson his website cannot be displayed when using the www in front of his domainname. When he only uses http:// and no www, his website displays without a problem. Do you know what may be wrong? I checkd if the www redirection file was created and it was:

    lrwxrwxrwx 1 judits judits 11 Apr 6 20:20 www -> public_html/

    Thanks
    The www symlink in an account's home directory has nothing to do with whether a site is displayed depending on whether you use the www prefix or not. It is only provided as a link to the public_html directory, to make it more obvious to which directory one should upload the site's content. It is not in any way connected to the Apache definitions that do control access with or without "www" in the URL.

    It is not clear from the discussion in this thread exactly what caused your problem, which is now resolved, but there are at least a couple of possibilities:


    • An A record for www.domain.tld may not have been created in the domain's zone file. This would have caused www.domain.tld not to resolve to an IP address, while domain.tld did resolve to an IP address.
    • Some type of redirect may have been defined, most likely in the .htaccess file in the account's public_html directory, to redirect www.domain.tld to another location.
    Last edited by cPanelJared; 09-02-2010 at 11:09 AM. Reason: Cleaning up formatting
    For hands-on assistance, please reference our new support information page: Where should I go for support?
    cPResources: Support Options - Submit a ticket here - Additional Support Options - Forums Search - Mailing Lists(Alt) - Documentation - Find cPanel hosting


    -- Jared Ryan, Technical Analyst, cPanel Technical Support

  9. #9
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Apr 2008
    Location
    PK
    Posts
    443

    Default

    Default account creation template in WHM does not contain an option to disable 'www'. However, you can simply change the www cname in the dns zone of the site to disable, or redirect www.domain.tld to some other location.
    Not many clients need www.domain.tld pointing to different location in my experience so adding this feature would not be that beneficial. If I had to disable this on a single server, I would just edit default DNS template and modify this line below to use www record per my need.

    www IN CNAME %domain%.

    Quote Originally Posted by B12Org View Post
    is there a setting in cpanel that you can use to disable www or to enable it after domain creation - additionally is that setting present when creating a domain or is always assumed that both @none and www will be required and is thus setup ?
    1 solution works for all problems. Trying harder!
    HostMasterTips - Understanding Tech Support

  10. #10
    Member B12Org's Avatar
    Join Date
    Jul 2003
    Location
    Seattle Washington
    Posts
    694

    Default

    Thanks - In Plesk for example you have check a box during domain creation to enable www for a domain (its not checked by default) so we get some customers that miss it and need us to enable it after the fact - something that is easy enough to do, so I was just wondering how cpanel did it.

    Thanks for clarifying for me
    Enom ETP - If you need a reseller account (or retail) contact me!

  11. #11
    Registered User
    Join Date
    Nov 2010
    Posts
    1

    Default Re: www not working

    Quote Originally Posted by JawadArshad View Post
    ServerAlias settting in the VirtualHost of any site (in apache configuration file) contains www.domain.tld by default. This ensures www.domain.tld loads the same contents as domain.tld.
    To further this point, I just had this same problem and when I checked the ServerName line in the apache configuration file (httpd), the hostname had "www." in front of it. From what I am told this creates a conflict in cpanel and the hostname should never contain "www". I erased the "www." and right away my site started working both ways.

Similar Threads

  1. Subdomain only working with www.
    By robtjames in forum New User Questions
    Replies: 2
    Last Post: 02-10-2010, 08:29 PM
  2. www. not working
    By HH-Steven in forum cPanel & WHM Discussions
    Replies: 5
    Last Post: 04-02-2005, 08:23 AM
  3. WWW Not Working
    By tgillespie in forum cPanel & WHM Discussions
    Replies: 1
    Last Post: 01-30-2005, 10:39 AM
  4. www not working
    By Ronny in forum cPanel & WHM Discussions
    Replies: 8
    Last Post: 04-13-2004, 05:19 PM