Simply put, a domain name is the concatenation of all labels found when you start at a node and follow the tree right upto the top. Write down each label separated by a dot. This is a bit simplified. The dots are really only a way to represent label separators, but for our purpose you can just use what I said.
Example: start at a node labeled "www". Write down "www". Then notice this node has a parent, called "example". So far you have "www.example". Then follow the tree to the next parent, which is labeled "com". You have "www.example.com". Then there's one more parent, which is the root node. It has an empty label. Append it, and end up with "www.example.com.". As you may have understood, this name does not end with a dot. There's an empty label at the end, not a dot.
This last step, appending the root node, is often left out. You still need to remember about this node, it could be important if you are going to edit a zone. For example: in bind zone files you need to type "mail01.example.com." and not "mail01.example.com", or else bind will append "example.com." and you end up with "mail01.example.com.example.com." !
All domains used in SPF need to be Fully Qalified Domain Names and this renders the root node redundant. You can leave it out (in fact: it usually is).
Some misconceptions:
- A domain is not the part following "www".
- A domain is not what most people get from their provider. Most people get a zone.
- A domain is not a web site or an e-mail address.
Please let me explain:
A Domain Name is nothing more (or less) than a name for a node in the DNS system. Every node has such a name.
If you got "example.com" from your provider, with separate names for a webserver, an ftp server and a mail server, you have one zone with four domains (the number can vary), for instance: example.com, www.example.com, ftp.example.com and smtp.example.com
When us SPF people talk about domains, we talk about domains, not about zones. If you need to publish an SPF policy for a domain, that is a big difference. If we ask if domain www.example.com is used to send email, we ask about domain www.example.com, not about zone example.com ! Also see this common mistake.