Hostnames, Domains
Jump to navigation
Jump to search
Domain name (UNIX)
- The domainname command manages "local" domains. The first thing to understand is that this has *nothing* to with Internet domains (DNS). *Nothing*. This is used to manage large subgroups of IP adresses into domains. For example, if you have 50 computers from 192.168.0.1 to 0.50 you could group them into the domain "servers", and use the domain "developers" for the machines above 192.168.0.50.
- Generally you don't need a domain name. If you use one, remember that domainname (on Gentoo!) does not echo the real domain name but the NIS one, which is not needed for most cases.
Domain Name System
General
- A domain name is hosted by (and bought from) a registrar. This registrar only handles the domain name registration (or transfer). It may or may not offer services related to this domain name. The only thing that is mandatory from this registrar is to at least link the domain to a name server.
- whois is a nice tool to obtain domain related information.
Name servers
- The name servers for a domain are extremely important since they control the actual translation of subdomain (or the main domain) to an IP or CNAME. Most registrars will have their own name servers (which can be usually configured via a Web interface), but you can also host your own (BIND is a well known name server). In this case you have of course to configure it correctly yourself.
- In any case, your domain should be linked to the name servers you plan to use! In the case of a domain transfert, the new registrar should initially point the domain to the old name servers in order to keep the configuration working until you reconfigure it. This means that you can use whatever name server you want, independently of where your domain name itself is hosted.
- Note that a change of name server can take 1-2 days for propagation. You should cancel the old registrar plan once the propagation is finished.
MX and SPF records
- MX records are for the mail (SMTP) system. You should create at least one MX record for the domain that will point to the correct host serving email for the domain. Note that there is a priority system if you define more than one MX record. A MX record can point to a CNAME.
- SPF records are used for anti-spamming measures.
Reverse DNS
- A reverse DNS query will give you the DNS of a given IP address. Note that ISPs (Free for example) assign a default reverse DNS, that you may ask to modify. If you don't modify your reverse DNS you may have problems with mail servers.
- Excellent source of information.