Results 1 to 9 of 9
  1. #1
    Join Date
    Jan 2005
    Location
    Ontario, Canada
    Posts
    18

    Question www. not working for all domains on server

    I'm currently experiencing a problem where all domains on a server are not resolving with www. --- the domains themselves resolve fine, but the www. cnames are not resolving to the domains. This has caused quite a frustration and I'm wondering if anyone else has encountered this and if there is a quick fix to resolve it.

    The domains appear to have the correct structure for the www. cname pointed to the domains so I'm guessing it must be something else.

    I'm seeing this from WHM/cPanel --- the operating system is CENTos

    Thanks for any help you can provide!

  2. #2

    .htaccess?

    If you have access to .htaccess and that the box support mod_rewrite, I suggest that you simply add a rule to append www to mydomain.com to quickly fix your problem.

  3. #3
    Join Date
    Nov 2002
    Location
    WebHostingTalk
    Posts
    8,878
    * Moved to Technical and Security Issues....

    Sirius
    I support the Human Rights Campaign!
    Moving to the Tampa, Florida area? Check out life in the suburbs in Trinity, Florida.

  4. #4
    Join Date
    Dec 2002
    Location
    USA
    Posts
    337
    I noticed the same thing after upgrading from Apache 1.3 to Apache 2.2.x.

    The .htaccess mod rewrite code stopped working to rewrite the URL of subdirectories such as http://foo.com/directory/ to http://www.foo.com/directory/

    And yes, mod_rewrite is enabled and working.

    Nothing changed in the original .htaccess. I wonder if the default httpd.conf changing during the upgrade is affected.

  5. #5
    Join Date
    Jan 2005
    Location
    Ontario, Canada
    Posts
    18
    Thanks for the responses -- so far this does not seem to have resolved the problem. I've been told it's a cPanel issue that I need to submit to cPanel for a resolution. I'll post the solution here when we find it, hopefully it will be helpful to others too.

    This has been quite frustrating

  6. #6
    Join Date
    Oct 2004
    Location
    Kerala, India
    Posts
    4,750
    What does the following result?

    dig @server_IP domain.com
    dig @server_IP www.domain.com
    David | www.cliffsupport.com
    Affordable Server Management Solutions sales AT cliffsupport DOT com
    CliffWebManager | Access WHM from iPhone and Android

  7. #7
    Join Date
    Jan 2005
    Location
    Ontario, Canada
    Posts
    18

    Resolution

    Hi Everyone,

    It appears the issue is with the ServerAlias reference in the httpd.conf

    Here's what it should be like (1.1.1.1 below represents your ip address)


    -----------------------------------------------------
    <VirtualHost 1.1.1.1:80>
    ServerName domain.com
    ServerAlias www.domain.com
    DocumentRoot /home/username/public_html
    -----------------------------------------------------

    For mine the ServerAlias was entered incorrectly for older domains, but a few recently added ones appeared correct so my only thought is that maybe earlier versions of cPanel did not enter this correctly. Mine were ServerName domain.com ServerAlias domain.com
    So no www reference there, even though in WHM, www cname's were setup.

    I'm not sure the real reason for this issue but must thank Server4Sale's support team for helping find the problem - they were extremely helpful in solving the problem. I believe that deserves a plug - www.server4sale.com


    I hope this can help someone else.

  8. #8
    Join Date
    Jan 2005
    Location
    Ontario, Canada
    Posts
    18
    david510 - thanks for your inquiry, to answer your question in my situation both those queries resulted in the same response. Although when visiting the two urls in a browser they produce much different results.

  9. #9
    Join Date
    Jan 2005
    Location
    Ontario, Canada
    Posts
    18
    New update -- Finally found a reference to this in cPanel's forums --- it appears others are having the same issue. This information should solve your issue quickly if you discover the same problem with your servers. (Much better than editing each individual reference)


    http://forums.cpanel.net/showthread.php?t=75808

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •