It all depends of your host interface.
With my current registrar, I do:
name: domain without www
type: A
target: The ip of the server
name: www
type: Cname
target: the domain (it points back to the A record we added before)
name: mail
type: MX
target: the domain name, to point it back to the A record
Some times ago, I used pmsdns.org, and in they interface, the "global" keyword was not ".", but "@"
This is what I got back when I query the servers:
For the domain without www:
Code:
host -v -a webalis.com
Trying "webalis.com"
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37643
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;webalis.com. IN ANY
;; ANSWER SECTION:
webalis.com. 86376 IN SOA ns.webalis.com. hostmaster.webalis.com. 53 28800 7200 604800 86400
webalis.com. 86376 IN MX 10 mail.webalis.com.
webalis.com. 86376 IN A 193.58.255.251
mail.webalis.com. 85765 IN CNAME blade.webalis.com.
blade.webalis.com. 85428 IN A 193.58.255.251
Received 116 bytes from 62.2.17.60#53 in 23 ms
It's maybe not the best exemple but:
1) I've set blade.webalis.com as the A record
2) I've set webalis.com as another A record
This is historically done. At some time, the main web site was running on a shared hoster.
Since I had a server, I had 2 A record; 1 for the shared hosting, and 1 for the vserver
3) mail.webalis.com is a CNAME pointing to the A record blade.webalis.com
4) The mx is set to that mail.webalis.com CNAME
Forget the SOA, you have no control over it.
And when I query the
www.webalis.com:
Code:
host -v -a www.webalis.com
Trying "www.webalis.com"
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25065
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;www.webalis.com. IN ANY
;; ANSWER SECTION:
www.webalis.com. 86400 IN A 193.58.255.251
Received 49 bytes from 62.2.17.60#53 in 262 ms
Which says that
www.webalis.com is a A record...
In fact, it's strange.... I thought I've setup a CNAME to either blade.webalis.com or webalis.com.
Anyway, my usual setup is:
1 A record, with the domain alone (or ".", or "@", it depends of your hoster interface) as a base.
1 CNAME to www
1 CNAME to mail
1 MX that point to mail
And then, extend it to your needs.
If you want to create subdomains (I do that for my projects, before hosting them for real) simply add a CNAME record