This should work:
@ IN A 10.0.0.0
www IN CNAME @
Question
Im having some troubles with the site.com and www.site.com version.
At this time the "www" is working, but if I access to the site without it I get a DNS error.
I have a VPS machine with ubuntu and bind9
Everything is OK, except the dns zone created for that domain.
I cant find a combination of A, CNAME, ALIAS or any record that load the site with both versions.
This is what I have on the dns zone:
www IN A 10.0.0.0
This line make the www version works fine.
Now, I want the non-www version, and I tested the following codes without luck.
@ IN A 10.0.0.0
@ IN ALIAS www
@ IN ALIAS www.site.com.
www IN A 10.0.0.0
@ IN CNAME www
@ IN A 10.0.0.0
www IN ALIAS 10.0.0.0
site.com. IN A 10.0.0.0
www IN CNAME site.com.
Nothing works. I really need both versions. The apache site config file is OK the alias and server name are right, but it looks like a dns problem.
Any idea? It will be appreciated.
Thanks
Solution
This should work:
@ IN A 10.0.0.0
www IN CNAME @