-1

I'm trying to configure a subdomain for a staging machine we have, to no avail. I'm no expert at all in Zone Files and configuration management, so please be patient if something I say sounds weird or ridiculous.

My Provider is Ghandi.net. I'm using already a machine for web hosting, and some other subdomains in the machine for test sites. So what I did is add a new A record that points to my machine IP for staging.

Here is the contents of the Zone file:

@ 10800 IN A 198.56.183.130
staging.mydomain.com 3600 IN A 46.101.202.144
blog 10800 IN CNAME blogs.vip.gandi.net.
imap 10800 IN CNAME access.mail.gandi.net.
isaf 3600 IN CNAME mydomain.com.
mvp 10800 IN CNAME mydomain.com.
pop 10800 IN CNAME access.mail.gandi.net.
smtp 10800 IN CNAME relay.mail.gandi.net.
webmail 10800 IN CNAME webmail.gandi.net.
www 3600 IN CNAME @

Is this correct?

AlejandroVK
  • 123
  • 6

2 Answers2

2

Convention is that resource record names that do not end in a trailing . are appended with the zone name:

staging.mydomain.com 3600  IN A     46.101.202.144
blog                 10800 IN CNAME blogs.vip.gandi.net.

then gets interpreted as:

staging.mydomain.com.mymdomain.com. 3600  IN A     46.101.202.144
blog.mydomain.com.                  10800 IN CNAME blogs.vip.gandi.net.

which might explain what happened and why staging.mydomain.com didn't resolve as expected.

HBruijn
  • 72,524
  • 21
  • 127
  • 192
  • Hello @HBrujin, thanks for the reponse, can you elaborate a bit further? I'm runnning into unresolved issues again, what should I type instead of staging.mydomain,com? Thanks! – AlejandroVK Aug 16 '15 at 20:07
  • I see your point, I misunderstood, but putting only staging, does not seem to work, I keep on getting unresolved with nslookup – AlejandroVK Aug 17 '15 at 06:10
1

Yes, that should be fine. If you are using a providers DNS, don't they provide you with an easy control panel to add a record and then save?

If you have to edit the zone file manually, make sure the host automatically increments the zone serial number or you do it yourself.

Or if you host your own dns, then yes this is correct still, but be aware of zone file serial incrementing.

tomstephens89
  • 981
  • 1
  • 11
  • 23
  • Yeah, I just pasted here the outcome of the Zone file in "expert mode". I make sure I use the latest version always. – AlejandroVK Aug 15 '15 at 16:18