In out last couple articles we installed and configured LAMP software on our server and created a two different websites using Virtual Hosts. Looks like we're right about ready to launch.
Well, hold on a bit because we should probably go over DNS first.
Basically, a DNS (Domain Name System) service just forms an association between human-readable website addresses (like ‘serversuit.com’) and bottom implementation layer, where the actual IP address looks like 188.8.131.52. In other words, DNS translates the raw IP address to a site name people would recognize.
First, you need to register your new domain at any domain registration service available, then you’ll need to create a few DNS records to make it all work together.
DNS records can usually be created with using the domain register management panel, or you can setup a DNS server, configure the domain zone for your domain, and make it a NS server for your domain.
1. “NS” records. NS means ‘name server’ and it will be filled automatically by your host in many cases. They hold names of DNS servers which can provide domain name to IP address translation for this domain. Each domain should have at least one, but two is recommended. For domain ‘serversuit.com’ it would looks like ns1.he.net, ns2.he.net.
2. “A” records. The most important DNS record stores actual IP address data for the domain name. For domain ‘serversuit.com’ it’s looks like: 184.108.40.206
3. “MX” records. This is the address of your mail server, and actually links to a corresponding “A” record for it. A domain can have more than one MX record, so each record has a preference parameter. For example, MX record for ‘serversuit.com’ is mail.serversuit.com. And the A record for mail.serversuit.com is 220.127.116.11
There's a lot of subtle differences in terminology here that could get confusing. Don’t worry, though. All you really need at the moment for your site to start working is one or two NS records (remember that in many cases your domain register will do this for you anyway) and one A record, pointing to your server IP address.
Note that DNS changes may take a few minutes to a few hours to propagate between the servers, so your site might not start working right away, and that's ok.
When you need to add email service for your domain, required steps are:
1. Install and configure a mail server
2. Add an A record for mail server address.
3. Add an MX record for domain.
Then you'd probably need to add SPF and/or DKIM records to protect your domain mail from spoofing, to avoid cases such as others sending bulk spam emails covered by your domain name.
I know I threw threw a lot of new terms at the end there, but I really do believe they're integral to a proper setup of a mail server. Do check those wiki links, for further information. And hey, you can always email or tweet at us to answer questions!
Just so you know, once you add a domain using ServerSuit, the DNS zone will be created automatically along with it!
Once it's created, you can manage it through our dahsboard. From there, creating subdomains is just a few clicks. And if you need to setup a mail server, SPF record will added automatically after installation, as well as DKIM record if you enabled it for your domain.
Basically, ServerSuit will handle most DNS issues we covered here! Give it a try!