Searched all over and tried playing with httpd.conf , nothing works.The domain name can be resolved with www.domain.com but without www its does not resolve.Advice for A Records does not work. I have a domain from Registrar otwohosting.net there panel is like publicdomainregistry.com and have options for nameservers. I have pointed nameservers, but with mx toolbox, only www.domain.com looks up and fails for non wwwWhat is the probable cause ? Here is snippet from httpd.conf <VirtualHost *:80>ServerAdmin webmaster@example.comDocumentRoot /var/www/html/mydomain.com/ServerName www.mydomain.comServerAlias mydomain.comRewriteEngine OnRewriteRule ^/(.*) http://mydomain.com/$1 [L,R=301]ErrorLog logs/dummy-host.example.com-error_logCustomLog logs/dummy-host.example.com-access_log common</VirtualHost>Its centos dedicated server, with firewall and yes port 80 is opened for tcp and udp both.Additionally any change in document root explictly for www.domain.com also dont work.As default doc root is /var/www/html/ but i do want it to resolve it to /var/www/html/mydomain.com/ directory .Please help thanksEDITHere is the link for my dns report[Link Removed]It gives strange result saying it can fetch dns records but cant resolve domain.. i am laughing and tearing down my head at same timeEdit2 Following the below answer here is the update:1) I do have 3 Nameserver received from my web hosting company . Although i have unmanaged dedicated server, but nameservers are not ns1.mydomain .. they are like ns1.mywebhost.com,ns2.mywebhost.com and have been feeded At Registrar panel2) created CNAME Record for Host:www , Value:mydomain.com - didnt worked3) I do have a dedicated IP Available which i should use for creating A record - Did not worked4) After performing these actions , domain is still not resolving. Even with www also it failed, which was working earlier.I'm running in a big trouble UPDATE 3:Finally the solution by closetnoc worked. I used domain Registrars' Nameservers, with an Additional A Record and CNAME record to my Dedicated IP and domain name respectively.Although the DNS propagation is very slow with my registrar (otwowebhosting.net a reseller of PDR ) , and i will plan to switch to dedicated DNS hosting service soon.Thanks
Domain Name Not resolving with webhost nameservers and without www
domains;nameserver;virtualhost;dns servers;httpd
This may be kind of easy!Your:ServerName www.mydomain.comServerAlias mydomain.com...is backwards, should be:ServerName mydomain.comServerAlias www.mydomain.comAlso, verify your DNS settings, just in case. You should have:A record for mydomain.com that is an IP addressEither a CNAME or A record where:_The CNAME is an alias www.mydomain.com for mydomain.com-or-_The A record for www.mydomain.com is the same IP address as mydomain.com[Update:]Your SOA is:ns1.p26.dynect.netTraditionally, there are 2 SOA DNS servers for fail-over so I am not sure why I only see one. This may not be an indication of a problem. Just a side note.Your Name Servers are:ns1.p35.dynect.netns2.p35.dynect.netns3.p35.dynect.netns4.p35.dynect.netYou have an A record for mydomain.com, but no CNAME for www.mydomain.com.It looks like dynect.net is a DNS hosting company and not your registrar. Your registrar is reporting that your name servers for your domain name are:NS1.DYNAMICNETWORKSERVICES.NETNS2.DYNAMICNETWORKSERVICES.NETNS3.DYNAMICNETWORKSERVICES.NETNS4.DYNAMICNETWORKSERVICES.NETIf I am right, your registrar name servers need to be set to:ns1.p35.dynect.netns2.p35.dynect.netns3.p35.dynect.netns4.p35.dynect.netNot all DNS servers like CNAME(s), but most work just fine.You will need to add a CNAME for www.mydomain.com that aliases to mydomain.com. If this does not work, then remove the CNAME and create an A record for www.mydomain.com that points to the same IP address as mydomain.com. Remember that it can take some time for a DNS entry to propagate out to the DNS servers that your client computer uses. I often avoid this by setting the network to use the name servers I have my sites hosted on. In this case, it would be 2 of the ns1.p35.dynect.net, ns2.p35.dynect.net, ns3.p35.dynect.net, ns4.p35.dynect.net.What is odd is that you say that www.mydomain.com works but mydomain.com does not. I do not doubt you of course, but it still leaves me confused. Somehow this does not make sense to me. But let's see if this solves your problem.[Update:] For the benefit of others.Any domain name is registered with a registrar. Every registrar is required to have a robust DNS infrastructure and one reason why I recommend that people use the registrars DNS servers. Another reason is the generally advanced control panel and support. Often this is free or very affordable.Most scenarios are as follows. The domain name is registered and the DNS entries are hosted with the registrar. The website is either hosted with the registrar (GoDaddy comes to mind) or with another hosting company. Most hosting companies have within their control panel DNS options. This is not to be confused with the registrars DNS. Most server installs contain Bind (a DNS server) and some server applications require domain name resolution which is supplied by elements of the Bind install.In this case, you have a registrar, a DNS host (it appears to be a service of the registrar under a different domain name), and a web host. Most of the time it is not this complicated. But I suspect that in this case, we are still using the model above.You will need: - NS entries that are the registrars name servers. You will need at   least 2 but the more the merrier. - An A record for mydomain.com that points to the IP address provided   by your web host. - An CNAME for www.mydomain.com that points to mydomain.com (optionally an A record can work too.) - Any MX records for e-mail. A MX record points to a domain name. Some like to set-up a sub-domain, but if e-mail is handled by the same system as the web server, this is not necessary.