How do I write a DNS record?

What is the most common DNS record?

As you may have guessed, it's the A record of our favorite web host.

If we're building our sites using names and addresses in a way that is simple to read and is scalable, why can't the DNS records for our sites be the same? Why does the host industry standard involve so much additional information? If names and addresses are meant to be so scalable and simple, then what about this? What if you could use a fully scalable name format by making all the most common record types the same size (16 bytes)? This would leave us with nothing more than type, ttl, and name: aaaaaaaaaa00xxxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxxxxx yyyyyyyyyyy000zzzz zzzzzzzzzzzzzzzzzzz. If we've learned anything, it's that the biggest problem we've had was storing all that stuff. It's time to try this on for size. First, I'm going to need some type and ttl fields, and I think my name is: "example." That's a cool example.com in here. It's right there in front of you.

You also know that all types (A, AAAA, CNAME, MX, and so on) need to fit into 16-bytes. But, you don't know how to make an example. Let's find out!

We'll start by trying to make A and AAAA look like The most common way to do that is to use the same format as the A record for the data field of the The text portion will be the canonical name the same way an A record works now. That means, we need to figure out how many characters in the "aaaa" prefix before we make it the canonical name.

And, we'll continue by making all AAAA records look like AAALet's go back to the example A record that we used above.

What are the examples of DNS?

The DNS (Domain Name Service) is a hierarchical tree of records that identify computers, services, networks, and other Internet resources. It provides clients with a simple way to identify resources on the Internet and helps servers direct requests to the appropriate resource. When you view your computer's IP address it is because a DNS record says that it lives in your company's network.

What if I was a hacker in a country without an independent DNS? How can I get access to another's internet? By using a third-party DNS service. For example, for the US, my public IP address is 208.67.222, but when I visited a website like it will take me to For an attacker, it could be possible to abuse my ISP or even Google DNS to redirect the data back to the hacker. The DNS entries are also kept up-to-date, as part of the reason Google has been under constant hacker attacks. Google DNS, and other providers, regularly release updates to thwart these attacks.

Another example of what DNS does would be if you wanted to log into another's network. In order to reach another's network you must use a specific protocol for the router's computer to contact that network. One common protocol is SSH. When you try to SSH to the host name, port 22, you are asking for a SSH connection. A special DNS record, also known as a forward entry, tells your computer how to contact the SSH server. If an attacker were to spoof your local DNS to point to another's machine, they could force you to log into the incorrect network.

Related Answers

What is a MX record in DNS?

I'm trying to figure out how to get MX records from nslookup, but I'...

What is exemption 7 in FOIA?

The Freedom of Information Act (FOIA) of 1966 provides the public with the rig...

How do I read DNS records?

POP (port opening protocol) is in essence a DNS lookup. The client asks the name...