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.

My domain doesnt work without www

Discussion in 'General Discussion' started by democreations, Mar 4, 2010.

  1. democreations

    democreations Member

    Joined:
    May 31, 2008
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Regards all....
    I think I tried every single solution for these mentioned online anywhere... SO here is the deal...


    I have mydomain.com registered.. and I am using ns1 and ns2 as nameservers for this domain....

    Both are added in dns...
    but when I type www.mydomain.com everything is ok .. but if I type without www so just mydomain.com in FF and Chrome redirect happends to www.mydomain.com/home/username/publichtml
    and in IE it shows error 404 page not found

    I have A record I have ns1 and ns2 record I checked httpd conf file seems to be ok

    I have another domain on that server setup ed exactly like this one and that other works ok ..

    So anybody have a clue whats wrong (yes my server alias in httpd config is ok )
     
  2. arab4w

    arab4w Registered

    Joined:
    Feb 25, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    My Darling Egypt
    hello, democreations

    I think you need to check the VirtualHost entry in your httpd conf file

    It Should be under VirtualHost of Site

    Code:
    ServerName domainname.com
    ServerAlias www.domainname.com
    then restart httpd and try to get connected without www

    Best Regards
     
  3. asent

    asent Active Member

    Joined:
    Apr 5, 2005
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Also check your account in cpanel. Should be added only as domain.com. Did you add it as www.domain.com?

    The httpd.conf would eventually get overwritten. It's best to find the root cause. What does the virtualhost look like? Can you post it? Are there dup entries (multiple virtualhost for that one domain)?
     
    #3 asent, Mar 4, 2010
    Last edited: Mar 4, 2010
  4. democreations

    democreations Member

    Joined:
    May 31, 2008
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Domain is added as mydomain.com

    Everything is setup exactly as on another domain on the same server which is working..

    mydomain.com. 86400 IN SOA ns1.mydomain.com.
    mydomain.com. In NS ns1.mydomain.com.
    mydomain.com. In NS ns2.mydomain.com.
    mydomain.com. In A xxx.xxx.xxx.xxx (my ip)
    localhost In A 127.0.0.1
    www IN cname mydomain.com.
    ns1 IN xxx.xxx.xxx.xxx (my ip)
    ns2 IN xxx.xxx.xxx.xxx (my ip)


    HTTPD CONF
    <VirtualHost xxx.xxx.xxx.xxx:80>
    ServerName mydomain.com
    ServerAlias www.mydomain.com
    DocumentRoot /home/USERNAME/public_html
     
  5. ChrisRHS

    ChrisRHS Well-Known Member

    Joined:
    Jul 12, 2006
    Messages:
    292
    Likes Received:
    5
    Trophy Points:
    18
    Check your .htaccess files for redirects.
     
  6. democreations

    democreations Member

    Joined:
    May 31, 2008
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    There isnt any htaccess in directory or directory above

    There isnt any htaccess in directory or directory above
     
Loading...

Share This Page