Have a new business idea and ready to build your new website? Or do you have an existing website you…
To better understand your hosting environment, you need to bring yourself up to speed with various aspects of internet infrastructure. While you may not be a technician, know a little bit about how the internet works can go a long way, and help you get the most out of your internet hosting. Introducing DNS, it stands for domain name system and is an integral part of the infrastructure of the web.
While DNS may appear to be a simple concept the deeper you dig you begin to unearth its complexity. Webmasters tend to spend a lot of their time diving into DNS records to solve common issues on a daily basis. This article is not an attempt to train you in all the intricacies of DNS records, that’s not necessary, instead, we will outline the basics to help you troubleshoot minor problems and manage them on your own if need be.
The main purpose of DNS is to match names to numbers much like a telephone directory. It was designed to solve the issue of computers communicating with numbers or binary code and not be able to communicate as people do.
When a device connects to the internet, be it a mobile device, computer, host, etc. it uses a group of numbers to identify it called internet protocol or an IP address. An IP address, for example, looks like this 718.104.22.168
In terms of websites, the entire landscape of the internet is the network. Within that network, it is compulsory that the IP address is unique. With DNS, a single mapping links an IP address to a website is called a resource record, the website is the resource. Resource records are grouped into zones and these zones are stored on nameservers.
Log into your cPanel account from your hosting provider’s client space. Click on the icon for the DNS Manager under the Domains section on the cPanel interface. Once inside you can edit the DNS records to reflect the nameservers of your host.
Whenever you make additions or changes to your DNS records, there is usually a 24-48-hour lag time before the changes take effect. This is because of the TTL value set for the record. In order to circumvent this lag time, simply reduce the TTL time temporarily before you edit the DNS record. TTL stands for time to live in seconds and can be modified in the Resource Records.
Once the changes to the TTL take effect, you can make changes to your DNS records. This ensures that your changes will propagate faster, and if a mistake was made, you don’t have to wait days to make additional changes.
There are over 30 different types of DNS records that can be executed. However, only a fraction of them is practical and necessary for a functioning website. The following DNS records are the most commonly used and modified:
The CNAME is a DNS record that stands for a canonical name. The purpose of a CNAME record is to redirect from one domain name to an alternative domain automatically.
For example, if you wanted shop.yourdomain.uk to automatically redirect to your Etsy shop, for example, you might add a CNAME record to achieve that. For example:
store.yourdomain.uk 86400 IN CNAME yourstore.etsy.com
The A, or Address record, is one of the most frequently used record types. It lets you map a domain name to an IP address. After adding an A record, the domain name is automatically affixed to the name you enter.
Thus, for example, if you want to create an A record for www.yourdomain.uk, you would simply need to add ‘www’ for the name value. The yourdomain.uk part is automatically implicit. Example: www 86400 IN A 722.214.171.124
A TXT record lets you add text data into your DNS records instead of numbers. Frequent use is for ownership verification. For example, if you want to use Google Webmaster Tools, one way of demonstrating that you own the domain is to add a TXT record comprising a random-generated string provided by Google. Google then verifies if the record exists to confirm you control the domain.
Example: yourdomain.uk 86400 IN TXT randomstring
MX means mail exchange. An MX record directs to the mail server that should be used to deliver mail for a domain using simple mail transfer protocol or SMTP.
MX records always direct to a domain, not an IP address. If a domain doesn’t have an MX record, a sending server will try to deliver mail to the domain’s A record instead. Example:
86400 IN MX 10 mail.domain.uk
Notice that the MX record doesn’t list a hostname at the beginning. That’s because it applies to the entire zone. The 10 is an additional number that sets the priority of this record if multiple mail servers are defined. Lower numbers than 10 have a higher priority.
As aforementioned, an NS record (nameservers) specifies which server is in control of processing queries for a domain. If you change hosting providers to a company other than where you have registered your domain, you would need to update the NS records.
Example: yourdomain.uk 86400 IN NS ns1.yourprovider.com
A PTR (pointer) record, is also called a reverse DNS record and helps resolve an IP address to a domain name. This is precisely the opposite of what an A record does. PTR records are primarily used to check if a server name is associated with the IP address from where a connection originated. PTR records are frequently used for outbound mail servers because many mail providers will reject or mark an email as a spam message if received from servers that don’t have a valid PTR record.
This is a DNS record is more complicated than simply adding a DNS record because a reverse zone must be set up first. Hosting.uk administrators configure reverse DNS on all of their email servers. If you use another hosting provider, contact the provider of your IP address to help to configure reverse DNS.
You decide to use your hosting provider or your domain registrar to manage your DNS records. It is entirely up to you. When your host is your domain provider the choice is much simpler. As with everything, there are pros and cons to deciding on using one or the other.
Using your domain registrar’s nameservers allows you to manage all domain configuration in one location. Alternatively, if your hosting package uses multiple domains or subdomains then it would be wise to use your hosting provider’s nameservers. They will automatically configure those domains to the corresponding DNS records