Google

How to Set Up Dns in 2026 (Full Guide)


All Right How Going Talking About

All Right How Going Talking About
All Right How Going Talking About

All right, how’s it going, y’all? Today, we’re talking about the system that has caused by far the most number of total internet outages, and that is DNS. DNS is incredibly simple. All it does is it tells your computer how to get to any website that you try to go to. And yet, it is also one of the most powerful tools you have for load balancing and traffic management on the internet. And also something that can completely take down massive swaths of the internet with just a single poorly written config file. Just this year, in January, Cloudflare published a single bad DNS config file that took out internet access effectively to millions of people for 2 hours, just with a single bad config file.

Because DNS Essentially Address Book Internet

Because DNS Essentially Address Book Internet
Because DNS Essentially Address Book Internet

And that’s because DNS is essentially the address book of the internet. It is the only way your computer knows where you want to go. When you type in www.google.com, that is what’s called a DNS record. You’re not typing in the IP addresses of Google servers. Instead, you are typing in the address you know you want to get to, and DNS is what your computer uses to figure out what you’re talking about. While DNS was originally just used for lookups, it’s also used for a lot of other things now. And probably the second most important one of all of them is SSL security and trust. When you go and you join a sketchy coffee shop Wi-Fi, and you go to google.com, in this day and age, you know nobody’s intercepting your packets in between.

Browser Able Guarantee Only Person Other

Browser Able Guarantee Only Person Other
Browser Able Guarantee Only Person Other

Your browser is able to guarantee that the only person on the other side of that connection who can understand your web request is Google or somebody who Google has authorized. That’s because Google owns the domain www.google.com, and they’re able to generate a thing called a signed SSL certificate for that domain. And And why in this day and age, you can join sketchy coffee shop Wi-Fi. You don’t need to have a VPN subscription. Because you know that the only other person who can read your packets is Google. And we’re going to be talking about all that, as well as going over how to actually use it on your own local network. And with that, how you can get better security and better performance just browsing the web.

Then Also Going Into How Use

Then Also Going Into How Use
Then Also Going Into How Use

And then also going into how I use DNS where I essentially don’t have to remember a single IP address at all. And every web browser I go to for all my local services here at the office all come back with a nice clean signed SSL certificate. So, I never get that this connection is not secure. And now I have a properly signed SSL certificate for every single server in my office, meaning I never run into that issue with this connection is not private for anything I’m going to. All right, so first off, what is DNS? DNS is the Domain Name System. And it’s been around for over 40 years. And what it’s designed to do is just translate IP addresses into more useful names like www.google.com.

All Started Out Now Does Much

All Started Out Now Does Much
All Started Out Now Does Much

And that’s all it started out as. But now it does so much more. It is the same system that’s used so that every time you send an email to specific domain your computer can figure out where to send that email. And then every email you get is signed with thing called DKIM that proves that the only person who could have sent that email has to be the person who owns that domain. And as I said, it’s also the thing that proves that the website is who it says it is. Doesn’t mean the website is secure and trusted. But every time you go to a website and you see that lock in the upper left-hand corner, you know that that website is exactly who they say they are.

Know Only Person Who Could Other

Know Only Person Who Could Other
Know Only Person Who Could Other

You know that the only person who could be on the other end of that line is whatever that domain is. Now, if you go to thisisavirus.com, thisisavirus.com can get a signed SSL certificate, and that does not mean it’s a trusted website, but you know that the only other person on the line listening in is the website you’re going to. And it all started out as this really simple lookup designed to keep us from just having to remember thousands of IP addresses for all the things we want to go to. What it does is it translates www.google.com into that IP address. And more specifically, it’s actually a hierarchy. That’s why it’s the system. So, one thing you may have noticed is sometimes you don’t go to www.

Company Example Www Spacerex Where Write

Company Example Www Spacerex Where Write
Company Example Www Spacerex Where Write

The company. So, for example, we have www.spacerex.co. That’s where I write up some tutorials, but we also have forums.spacerex.co. The way it DNS works is you own everything below you. So, I own spacerex.co and yarbrdtechnologies.com. That means I own everything that comes in front of.spacerex.co. I can control forums.spacerex.co. I can also control house.duck.spacerex.co. I can have as much stuff in front of my spacerex.co as I’d like, and I have ownership over that. And it’s all verified through these things called root name servers that all forward it on. So, when you’re going to different sites, you will often go to these different mail.google.coms or search.google.com and all those different things. And that is one of the key parts about how DNS works.

Domain Name System Hierarchical Thing There

Domain Name System Hierarchical Thing There
Domain Name System Hierarchical Thing There

It is the domain name system, and it is a hierarchical thing. And there’s a lot of really interesting stuff with how DNS lookups actually work, as well as the entire root domain system, and about how there’s only a few people who pretty much have complete control over the internet should they ever choose to abuse their power, those who hold the root domain keys. And if people are interested, I will absolutely do a more in-depth tutorial on that. But today, we’re really focusing on how it’s actually used, rather than the nitty-gritty back-end on how DNS lookups work. But the long story short of it is, when you buy a domain, you are buying the right to tell anyone on the internet who’s looking up anything on that domain or any subdomain of it, exactly what to do.

Includes Where Send Emails Who Behalf

Includes Where Send Emails Who Behalf
Includes Where Send Emails Who Behalf

That includes where to send emails, who can send emails on your behalf, where to go for web pages. Where to go to get a trusted signed SSL certificate. You control all that through this thing called DNS and DNS records. And so, every time you go to a web page, your computer has to figure out where that web page is. And because it’s got this hierarchy, if it’s not cached, it has to do a bunch of lookups. First, for example, let’s say you’re trying to go to www.google.com. Well, first, your computer has to figure out where com is. So, it has to ask where com is. Then it has to ask where Google is from the com server.

Finally Ask Google Com Server Where

Finally Ask Google Com Server Where
Finally Ask Google Com Server Where

And finally, it’ll ask the google.com server where www.google.com is. And so, especially the more lookups you have there, that can get really slow if it’s not cached. And that’s actually why having a couple of really simple settings on your router can make your web browsing experience so much faster. All right, so with all that out of the way, we’re going to go over how you can configure your DNS settings on your router to get better performance going to websites, as well as even do things like ad blocking and malware blocking just by changing a few settings in your router, or even just on your local computer if you want to. Then we’ll go a step further and show how we’re set up with our own DNS server, where we can define anything on the local network that we want to.

Never Type Whatever Instead Just Nas

Never Type Whatever Instead Just Nas
Never Type Whatever Instead Just Nas

So, you never have to type in 192.168.whatever. Instead, you just type in nas.yourdomain.com and it brings you straight to the NAS. And that way, if you need to change your IP addresses, you don’t have to update a bunch of config files. You change it once and everything just points to the new server. All right, so we’re going to jump right into it. So, first off, whenever you’re setting up DNS, one of the most important things to understand is a DNS server. DNS servers have one of two functionalities and generally, they will do both. What a DNS server does is it will look up an address for you. So, it’s really inefficient for your computer to look up every single address every single time.

Computer Does Four Lookups Every Single

Computer Does Four Lookups Every Single
Computer Does Four Lookups Every Single

Your computer does not need to do four lookups every single time it needs to go to www.google.com. Instead, what you can do is you can use what’s called a caching DNS server. What a caching DNS server does is it will try to cache DNS lookups for you. When it first turns on, it has no clue where www.google.com is. So, when you ask where www.google.com is, the caching DNS server has to figure it out. And it’ll go through that really long slow process of asking where the root DNS servers are. Asking where.com is. Asking where Google is. Asking where www is. It’ll go through that really slow process. Then after that, it’ll say, “All right. Next time I need to know, I will remember that on out.” And so, using a fast caching DNS server makes your internet faster.

Every Time Website Loads DNS Lookups

Every Time Website Loads DNS Lookups
Every Time Website Loads DNS Lookups

Every time you go to a website that loads 15 DNS lookups for the different fonts, images, ads, everything, Having a fast cache DNS server that doesn’t have to deal with the many, many lookups for every single one of them makes your web browsing experience so much faster, and you can configure that by configuring your DNS server. The other thing a DNS server does is actually respond to root lookups. And by the way, the other thing the DNS server will do is it can also override or define things. So, as I said, I own spacerex.co. That means I define what DNS server everyone in the world looks at when they try to go to anything.spacerex.co. And so, my DNS server defines that, and so when somebody looks it up, that’s what it tells them.

All Right Now Let Actually Look

All Right Now Let Actually Look
All Right Now Let Actually Look

All right, so now let’s actually look at what most people will use. And most people have really three options for what they would like to use for their own like DNS server, and we can see these settings on our actual computer right here under network. DNS. So, right here, you can see that we’ve got two DNS servers. And these are actually local IP addresses, so I actually go a step further than the vast majority of people will use, and I’ve got full-blown two local resolvers that write my own DNS records for spacerex.co, and so I’m able to essentially just never have to remember IP addresses again. But, for the most part, you will probably be selecting a upstream caching DNS server because they’re going to be way faster than the one your ISP gives you.

Right Now These DNS Servers Been

Right Now These DNS Servers Been
Right Now These DNS Servers Been

So, right now, these DNS servers have been defined by my router. So, every time your computer connects to a network with DHCP, it asks for an IP address, it asks where the router is, and it also asks what DNS server should it use. And so, in your router, you get to define what that is, but you can override it right here. So, as I said, there are three different types of DNS servers that most people will use. They will either use a one that’s on their router, which caches even closer to you. So, that way when you and your family are all going to the same websites, it doesn’t even have to go out to the internet.

Instead Router Caching DNS Server Which

Instead Router Caching DNS Server Which
Instead Router Caching DNS Server Which

Instead, your router will be that caching DNS server, which speeds it up greatly. The other thing is, as I said, DNS is a really critical part of the internet. So, if you lose DNS, you lose the internet access. That’s why anytime you’re running DNS, you need at least two of them. Because if it goes down, your internet’s effectively down. So, using your router as a DNS server is great because if the

Router Goes Down Internet Anyway Set

Router Goes Down Internet Anyway Set
Router Goes Down Internet Anyway Set

Router goes down, your internet’s down anyway. So, if you set up your router to be a local caching DNS server, you can choose to use that. Or, if your router comes from your ISP and there’s not really anything that you can do to change that, but you want to use the faster DNS caching servers than the ones your ISP has, what you can actually do is override these, even on your computer.

Could Use Cloudflare One Primary Then

Could Use Cloudflare One Primary Then
Could Use Cloudflare One Primary Then

So, I could use Cloudflare’s one as my primary and then Google as my backup. So, 1.1.1.1 is Cloudflare’s. By the way, that’s the exact same server that went out at the start of this video. So, that’s why anytime you’re setting up DNS servers, you probably want to hedge your bets and not just rely on one. Instead, ideally, you go with two different providers. So, this is Cloudflare and this is Google. And to me, if both Cloudflare and Google are out, well, the internet’s probably down itself anyway, so it doesn’t really matter. So, this is option one. These are really, really, really fast DNS resolvers. 1.1.1.1 tends to be the fastest, and that really matters. The quicker you can get a response, the quicker your web pages will load.

True Even Got Fastest Gigabit Fiber

True Even Got Fastest Gigabit Fiber
True Even Got Fastest Gigabit Fiber

This is true even if you’ve got the fastest 5-gigabit fiber. If you’ve got a slow DNS server, the internet will feel slow as you’re going to different websites. So, this is a really common DNS option and something that is an easy default. The other thing I found is ISPs will do weird stuff with DNS lookups. They’ll try to add security features where they’re just kind of trying to spy on

Adding Own Ones Pick Never Bad

Adding Own Ones Pick Never Bad
Adding Own Ones Pick Never Bad

You. So, adding your own ones that you pick is never a bad option. Finally, there’s one more class of DNS servers that you can use, and those are your malware-blocking, ad-blocking DNS servers. Now, these are not perfect. So, because DNS is used to figure out where things like ads are, you can go to a blocking DNS server that blocks ads, blocks websites that are malware, or even things like adult sites.

Now Trying Parental Control Kid Going

Now Trying Parental Control Kid Going
Now Trying Parental Control Kid Going

Now, if you’re trying to do this for parental control, the kid’s going to be able to figure out a way around it. But, as a way to block ads or even just get better security by blocking known malware sites, you can use things like Quad9’s DNS servers that are really designed for blocking out known bad websites. So, if www.thisisavirus.com is found to be a virus, Quad9 will block those lookups. And so, that way, if you accidentally go to it, your computer can’t figure out how to get there. And so, what you can do is choose another provider and use these for different things like blocking ads or blocking malware. There’s another thing that a lot of people will use called a Pi-hole, so you can use your own Pi-hole and completely customize it locally to have all these DNS providers.

One Way Really Speed Internet Traffic

One Way Really Speed Internet Traffic
One Way Really Speed Internet Traffic

So, this is one way that you can really speed up your internet traffic and even add an extra layer of protection to your network all by just changing the DNS settings. So, this right here is how you can change the DNS settings on a individual computer. But, we can also set it for what’s called DHCP by coming in. Most routers will have an option for this where you can set what are called the DHCP DNS servers for your devices by going to your router. So, in UniFi, it’s under network, whatever network. And you can tell every single one of your devices that connects what IP addresses it should use for DNS. So, this right here is where I can define whenever device connects in, what should they look for when they’re trying to look up addresses?

What DNS Servers Should Use Now

What DNS Servers Should Use Now
What DNS Servers Should Use Now

What DNS servers should they use? So, now let’s take it even a step further. By default, this UniFi is its own caching DNS server. So, what we can do here is we can actually override and define whatever DNS records we want to. And if you’re going to do this, I would highly recommend buying your own domain. They’re not that expensive. And if you do this with your own domain, you can actually get signed SSL certificates. So, I can come in right here and I can create a custom DNS rule that resolves to whatever I want to. I can say nas.spacerex.co is at 10.50.1.1. So, what this will do is this will essentially intercept any DNS lookups that are going to nas.spacerex.com and instead point them here.

Then Doesn Match Any Ones List

Then Doesn Match Any Ones List
Then Doesn Match Any Ones List

Then, if it doesn’t match any of the ones in this list, it’ll just use DNS regularly. So, this is a great way of getting your own DNS lookups without having to do what I’ve done where you’ve actually fully defined out multiple bind DNS servers to define your entire network. But, the way this works is you’re able to add in your own DNS overrides to customize out whatever you like here. So, this is actually something I would really recommend doing if you’ve got more than just a couple servers. Go ahead and buy a domain. Go to GoDaddy. Go to CloudFlare. Go to anywhere you want to register a domain and register it. Then, you can define whatever records you’d like to on that to be your own servers.

Now Because All Local There Actually

Now Because All Local There Actually
Now Because All Local There Actually

Now, because this is all local, there’s actually nothing to stop me from going and saying something I don’t even own, google.com. I can still override any DNS record out there. And this is actually how Pi-hole works by ad blocking. They just override the records to point them to nothing. But, the problem is now, one, this only will ever work in my local network or any other networks I control. And two, later on down the line, you’re never going to be able to get a properly signed SSL certificate for that. But, if you do this with a domain you own, you’re actually able to get a thing called a signed SSL certificate for that. And so, that’s exactly what I’ve done.

Going Over Too Depth Here Look

Going Over Too Depth Here Look
Going Over Too Depth Here Look

I’m not going to go over it too in-depth here, but if you look, this is what’s called Metabase. It’s one of my mini web servers, and it it goes through and it gives me a nice dashboard for metrics and just reading in my database. Really long story, but if you look up here, we never got to it. This connection is not private. If we come in and look at the SSL certificate. We can see that my web browser is fully trusting this. Even though this is not accessible to you. If you try to go to metabase.sv.spaceracks.co, you’re not going to be able to get there. But because I own spaceracks.co, I was able to use a Let’s Encrypt wildcard certificate to get a fully signed SSL certificate for spaceracks.co.

Way Every Single Web Browser Network

Way Every Single Web Browser Network
Way Every Single Web Browser Network

And that way every single web browser on my network has a fully signed SSL certificate, so we don’t have to worry about that this connection’s not private. Now, because you’re running that locally, does it matter? No. But for things like Bitwarden and password managers and other things like that that require a fully signed SSL certificate to work, it is really nice to have. All right, so that’s going to be it for this tutorial. There’s so much more that DNS can do. And if you were looking for a more basic, “Hey, these are all the things that DNS works on the internet.” guide, I will absolutely make one. Put those down in the comments below. If you want to hire me, there’s a link for that down in the description below. And have a good one. Bye. >> [music]

Disclaimer

Disclaimer: This article is shared for general information only. It is not professional medical, legal, or financial advice. Always consult a qualified expert before acting on any information in this post. The author and publisher are not responsible for any loss or harm from use of this content.

Leave a comment

Your email address will not be published. Required fields are marked *