I changed my router’s DNS to a NAS and suddenly websites loaded much faster


For a long time, I struggled with slow web browsing at home. My Internet connection isn’t particularly fast, but I could swear that websites load faster on my old Wi-Fi 5 router than on my new Wi-Fi 7 model. That didn’t make much sense. Although the newer router is a budget model, it still includes newer technology and supports much higher theoretical bandwidth.

So I spent countless hours modifying my network and experimenting with different DNS providersbut nothing made a noticeable difference. Ironically, the real solution came while I was working on an unrelated NAS project. By move DNS tasks from my router to my NASWeb browsing across my entire network became much more responsive.

Why your router shouldn’t handle DNS forwarding

Consumer routers already have enough of their tasks

A typical home router has to perform a surprising number of tasks. It manages your local network, routes traffic between your devices and the Internet, operates Wi-Fi radios, assigns IP addresses, applies firewall rules, handles device discovery, and more.

On top of all that, it often acts as a DNS forwarder for every device on your network.

If you’re not familiar with DNS forwarding, it’s the process of receiving a DNS request from a device and passing it to an upstream DNS server, such as Cloudflare, rather than resolving the request locally. Once the upstream server returns a response, the router returns that response to the device.

In other words, the router acts as an intermediary for each DNS lookup. While DNS forwarding is not a particularly demanding task in itself, it is very sensitive to latency. All websites, apps, and online services rely on DNS lookups, so even small delays can disproportionately impact the responsiveness of your browsing experience.

Typically, a powerful router can handle these responsibilities without problems. However, budget routers like my $50 Wi-Fi 7 router use modest hardware that can’t resolve requests as quickly.

Software can be as important as hardware. Many consumer routers rely on lightweight DNS services with limited caching and customization options, such as dnsmasq. Dedicated DNS software running on a NAS can maintain a much larger cache and provide a high level of customization, allowing you to respond to queries more quickly and efficiently.

In my case, moving DNS tasks to my NAS reduced the time needed to respond to DNS queries and made web browsing seem noticeably more responsive.

Running a DNS server on my NAS made browsing noticeably faster

The improvement was immediate.

A laptop with a hard drive enclosure that is used as a NAS. Credit: Ismar Hrnjicevic / How-To Geek

My NAS is nothing fancy – it’s just an old laptop that I repurposed into a home lab and 24/7 storage machine. If you have slow browsing despite a fast connection, this is a project you can realistically replicate using a cheap raspberry pi.

The reason I initially installed AdGuard Home on my NAS was not to improve DNS speed at all. In case you haven’t heard of it, AdGuard Home is a DNS server that acts as a “sink” (network-wide filter) for unwanted domains.

My main goal was to block known malicious websites, reduce unnecessary telemetry traffic, and reduce heavily advertising domains, especially on Smart TVs and IoT deviceswhich tend to generate a lot of background requests that you can’t really control or disable.

After installing AdGuard Home, configuring some upstream DNS providers, adding pre-built blocklists, and pointing my router as the primary DNS server, everything worked exactly as expected. About 30% of all DNS queries on my network were now being filtered at the network levelwhich alone reduced the workload my router had to do.

That was the goal, so at first I didn’t give it much thought. But once I started browsing as usual, I immediately noticed something I wasn’t looking for: websites opened noticeably faster.

As it turned out, moving from router-based DNS forwarding to AdGuard Home on my NAS resulted in a much larger and more efficient DNS cache, which improved the speed of repeat lookups as more responses could be delivered locally rather than being resolved again upstream.

Hardware also played a role. Routers are essentially small general-purpose computers, and budget consumer models tend to have relatively weak processors and limited RAM. “Although my NAS is just an older dual-core laptop processor with 4GB of DDR4 memory, it still offers a notable step up for running dedicated services like DNS.

The laptop can handle incoming queries quickly, check block lists, query the cache, log requests, and forward unresolved queries.

Perhaps the most underrated benefit is that the router now doesn’t have to handle DNS forwarding for every device on the network, freeing up a significant amount of overhead for everything else it has to do.

A self-hosted DNS server offers other benefits too

The increase in speed was just the beginning

An ASUS Wi-Fi 6E router placed in a box. Credit: Goran Damnjanovic / How-To Geek

In addition to improving DNS lookup performance and filtering out unwanted traffic, self-hosting a DNS server like AdGuard Home or Pi-hole offers many other benefits.

One of them is local DNS rewrites. Instead of typing the IP address of a device each time you want to access it, you can assign it to a custom host name. So instead of accessing your router settings by typing 192.168.1.1, you can simply type something like router.home and be taken directly there.

It’s a small but surprisingly useful tweak, especially if you have a lot of self-hosted devices and services on your network.

While that is convenient, a potential even The biggest benefit is privacy.. You can configure your upstream DNS servers to use encrypted protocols such as DNS over HTTPS (DoH), prevent your ISP from seeing your DNS requests and the domains your devices search for.

While you can technically achieve the same thing by enabling encrypted DNS on your router or configuring it manually on each device, not all routers and devices support encrypted DNS servers.

But perhaps my favorite benefit of self-hosted DNS is finally having visibility into what’s happening on my network.

AdGuard Home provides a centralized log of DNS queries from each device that uses it, which is how I discovered that some of my IoT devices were constantly “calling home” in the background. Thanks to the panel, I found out about this, which ultimately led me to completely restrict his Internet access.


It is one of the easiest but most effective projects I have ever done.

I started this project expecting very little, but in the end it made a drastic improvement in my daily internet usage and workflow. Offloading DNS tasks to my NAS makes everything feel a bit faster, although my actual internet speed remains exactly the same.

If you have a spare mini PC or even an SBC like a Raspberry Pi out there, you can probably use it as a DNS server. It’s a simple project with a surprisingly noticeable impact, so it’s definitely worth a try.



Source link

Leave a Reply

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