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 www
What is the probable cause ? Here is snippet from httpd.conf
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/html/mydomain.com/
ServerName www.mydomain.com
ServerAlias mydomain.com
RewriteEngine On
RewriteRule ^/(.*) http://mydomain.com/$1 [L,R=301]
ErrorLog logs/dummy-host.example.com-error_log
CustomLog 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 thanks
EDIT
Here 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 time
Edit2
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 panel
2) created CNAME Record for Host:www
, Value:mydomain.com
- didnt worked
3) I do have a dedicated IP Available which i should use for creating A record - Did not worked
4) 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