Hi! Today I’ll explain some basic terms and show you on a simple example how to set up DNS records manually. First of all, let me start by explaining some basic terms.
First, you should be able to differ web server, mail server and name server (these are the 3 basic servers for the complete web solution – for running web site and functional e-mail service).For the simplicity of explanation, lets use www.example.com as our domain we wish to set up, and dns1.examplens.com and dns2.examplens.com as our nameservers.
Web server – contains our www.example.com web site files
Mail server – processes any incoming / outgoing e-mails sent to / from example.com domain
Name server – server that differs different type of requests for our domain
Basically, all three servers can be separated to 3 different PCs (servers), but on the other hand everything can be set up on same PC (server) – but that’s not the common practice. Usually web and mail server are located on same machine, and name server is separate one – it’s not the best practice, but it’s better than everything on one server. On my sample settings I’ll show you how to separate all of them.
As I said before all requests go through name server(s) first. The logic is next:
So, here’s a basic example, so that you can understand the picture:
- Request for web page comes to a name server, name server 1, to be exact.
- If name server 1 is unavailable for some reason, the request automatically goes to name server 2.
- Name server 3 processes request to web server.
- Web server replies to name server 2.
- Name server 2 give us back the reply from web server.
Same logic applies to any server request (e-mail, ftp, http, https, etc.).
First, I apologize if i had too long introduction, but it might be necessary for some to understand the logic, before they can setup their own DNS records.
And now, finally, I’d like to give you sample information on how to setup DNS records. 😀
Additional information you need to understand the records are these:
- 184.108.40.206 – IP address of web server
- 220.127.116.11 – IP address of mail server
the records are as follows:
Host TTL Type Data www.example.com 0 A 18.104.22.168 example.com 0 A 22.214.171.124 mail.example.com 0 A 126.96.36.199 example.com 0 MX mail.example.com example.com 86400 NS dns1.examplens.com example.com 86400 NS dns2.examplens.com
For the example, i used 3 types of records (A, MX and NS). A records are “value” records, MX is the “Mail server” record, it tells where to forward all the e-mails from here, and NS records contain information of name servers that are used.
For detailed study of DNS records, I recommend this link.