My domain doesnt work without www

democreations

Member
May 31, 2008
8
0
51
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 )
 

arab4w

Registered
Feb 25, 2010
2
0
51
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
 

asent

Active Member
Apr 5, 2005
33
0
156
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)?
 
Last edited:

democreations

Member
May 31, 2008
8
0
51
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
 

democreations

Member
May 31, 2008
8
0
51
There isnt any htaccess in directory or directory above

There isnt any htaccess in directory or directory above