DNS Management¶
Introduction - DNS Management¶
DNS translates domain names to IP addresses and that's why it is often called the "phonebook of the Internet."
Domain Naming Service (DNS) establishes the correspondence between the domain name of your site (e.g : https://agency.krenovate.com/) and the IP address where it is hosted (e.g : 213.244.184.122) on the Internet. A DNS server is a machine which makes this correspondence.
Types of DNS Records¶
Some of the type of DNS records used are discussed below:
A Records¶
A Records direct browser requests to an origin web server.
CNAME Records¶
CNAME Records direct browser requests to an origin web server, but — unlike an A or AAA record — do so via a hostname like www.agency.krenovate.com instead of an IP address.
MX Records¶
MX Records are necessary for delivery of email to a mail server. Any MX record Server name requires a corresponding A record that lists the IP address of the mail server.
TXT Records¶
TXT Records are commonly used for mail authentication.
SPF Records¶
An SPF record is a type of TXT record that lists all servers authorized to send email messages from a domain.
DKIM Record¶
DKIM records are a type of TXT record that associate email messages with domain names.
NS Records¶
NS Records contain information about your nameservers. Use these records to identify which nameservers you should use if you want to manage your domain with a different hosting service.
Note
The top 4 records are the most commonly used records.
Read more about DNS Record types here
Platforms¶
At Krenovate, we use 3 platforms to manage the domains for client websites. All 3 are explained below:
GoDaddy¶
In this case, the domain is registered and hosted with GoDaddy. All the DNS settings will be managed through the GoDaddy account. Follow the below steps:
- Login to your GoDaddy account.
- Select your domain to access the domain settings page.
-
Click -> Manage DNS
-
If an A record already exists, you can edit it to the IP you want or Create a new one.
- To add “www” subdomain use add a CNAME record which points to “@”.
Edit/Change an A Record¶
-
On the DNS Management page, select the edit dns icon next to the A record you need to edit.
-
Edit the below details for your A record:
- Host: The host name the A record links to. Type @ to point directly to your domain name.
- Points to: The IP address you are setting as the destination for the host.
-
TTL: How long the server should cache information. The default setting is 1 hour.
-
Click -> Save to save changes.
Note
The above process can be followed to edit/add any kind of record. Refer the Link
DigitalOcean¶
In this case, if the Domain is registered with other registrar we can manage the DNS on DigitalOcean, hence, the DNS records would be managed through the DigitalOcean account.
This is determined by where your nameservers are pointing.
Add Domain¶
Adding a domain you own to your DigitalOcean account lets you manage the domain’s DNS records with the control panel and API. Below are the steps to follow:
- Login to your DigitalOcean Account.
-
From the control panel, click -> Create menu -> Domains/DNS.
-
Networking section - Enter domain name in Add a Domain field.
-
Once you’ve added a domain, click its name to view and modify its DNS records.
Refer - How to Add Domain
Manage DNS Records¶
Now, you can add, modify, and delete DNS records for a domain.
Create a New Record¶
To create a record:
- Select the record type just below the heading
- Fill in the fields required for that record type
-
Click -> Create record.
Modify/Edit a Record¶
To modify/update/delete an existing Record:
- Open the record's More menu
- Click -> Edit Record - to change/update the record values.
-
Click -> Delete - to permanently delete the record.
Refer - Manage DNS Records
The supported record types sections have detailed instructions for each type of record.
Nameservers¶
This is an important step in order to be able to manage your domain through DigitalOcean.
To connect a GoDaddy domain with the DigitalOcean droplet, we have to replace the GoDaddy nameservers with the DigitalOcean Nameservers. Follow the below steps:
- Login to your GoDaddy account.
- Go to -> Domain manager
-
Click on the domain name you want to manage
-
Scroll down to -> Manage Nameservers
-
Click -> Change
-
Enter the DigitalOcean Nameservers here. DigitalOcean name servers are by default:
- ns1.digitalocean.com
- ns2.digitalocean.com
- ns3.digitalocean.com
-
Wait for few minutes for GoDaddy to refresh the DNS settings. The Manage DNS should look like this:
Cloudflare¶
At Cloudflare, DNS can be managed for a domain registered with some other registrar. For this to happen - a unique account for each client has to be setup. To do so, follow below steps in this guide:
Create a Cloudflare Account¶
- Go to www.cloudflare.com
- Signup using an email id and password.
-
Click -> Create Account
Add a Domain to the account¶
- Login to your Cloudflare account.
- Click on Add Site from the top navigation bar.
-
Enter your website’s root domain and then click Add Site. For example, if your website is "www.krenovate.com", type "krenovate.com".
-
Cloudflare, will then attempt to automatically identify your DNS records. This process takes approximately 60 seconds to complete.
At this step, make sure that all the important records are being set properly. Some missing records may need to be added manually.
-
Select a plan level - click confirm for the selected plan.
-
Copy the 2 Cloudflare nameservers displayed and click Continue.
-
To finish domain setup and activate your domain on Cloudflare, change your domain nameservers to Cloudflare, as in the below section.
Change your domain nameservers to Cloudflare¶
To change your domain nameservers, you will need to use information from Cloudflare to update admin settings at your current registrar.
-
Login to your registrar (GoDaddy) account and remove the existing nameservers.
-
Replace with the Cloudflare nameservers (copied in step 7 in the above section).
-
Click -> Save - wait for a confirmation mail within 24 hrs.
Refer here for more information
Managing DNS Records¶
Add DNS Records¶
If you need to add DNS records manually:
-
Within a specific account and domain, go to DNS.
-
Select -> Add record.
-
Based on the record Type, you may have to fill out different fields. Refer link for complete instructions.
Delete a DNS Record¶
-
Within a specific account and domain, go to DNS.
-
On a specific record, select Edit.
-
Select -> Delete. A confirmation dialog appears.
-
Select Delete again to confirm.