Every time you open youtube.com, your device asks a DNS server: what is this site's IP address? On a MikroTik router, that question is answered by the built-in DNS resolver in RouterOS, and setting it up takes about five minutes. You get faster name resolution for every device on your network, plus the option of encrypted DNS.
Set it in WinBox
Open WinBox, go to IP, then DNS. In the Servers field, type 8.8.8.8,1.1.1.1 (Google and Cloudflare). Check Allow Remote Requests, then Apply and OK. That checkbox is what lets the router answer DNS queries from your own devices; without it, the router only resolves names for itself.
Then tell your DHCP clients to use the router as their DNS server. Go to IP, then DHCP Server, tab Networks, open your network (usually 192.168.88.0/24), and set DNS Servers to the router's LAN address, for example 192.168.88.1. Devices need to reconnect or renew DHCP to pick this up. Verify with nslookup google.com on a laptop: the Server line should show 192.168.88.1.
Or one line in the terminal
/ip dns set servers=8.8.8.8,1.1.1.1 allow-remote-requests=yes /ip dhcp-server network set [find address=192.168.88.0/24] dns-server=192.168.88.1 /ip dns print Which DNS is fastest? Measure it yourself
I tested Google (8.8.8.8), Cloudflare (1.1.1.1), and Quad9 (9.9.9.9) from my VM with dig, five rounds per domain. Every resolver answered in 0-1 ms, too fast to rank, because the VM's network path intercepts DNS. That is the honest result: the test says nothing about which resolver is fastest from a real home connection, where 5-40 ms is normal. So measure from your own network with dig @8.8.8.8 google.com | grep "Query time" versus @1.1.1.1 and @9.9.9.9, repeat a few times, and pick the two fastest for your router.
DNS over HTTPS on RouterOS v7
On RouterOS v7, one command encrypts your upstream DNS queries:
/ip dns set use-doh-server=https://cloudflare-dns.com/dns-query verify-doh-cert=yes I tested Cloudflare's DoH myself with curl: four attempts, all HTTP 200, all returning valid YouTube IPs. Each cold connection took 380-1,130 ms because of the TLS handshake, but RouterOS keeps DoH connections open (up to 5 by default), so that cost only hits the first query. Keep the Servers field filled even with DoH on: the router still needs a plain resolver to look up the DoH server's own hostname.
The one thing you must not forget
Allowing remote requests without a firewall rule turns your router into an open resolver that anyone on the internet can abuse for DNS amplification attacks. Block port 53 from the WAN side:
/ip firewall filter add chain=input protocol=udp dst-port=53 in-interface=!bridge action=drop /ip firewall filter add chain=input protocol=tcp dst-port=53 in-interface=!bridge action=drop Adjust !bridge to your LAN interface name. Local queries stay allowed; internet queries get dropped.
The full Indonesian tutorial, with static DNS entries for local names like router.lan and a step-by-step troubleshooting checklist, is on my blog: https://www.miftahulrizki.eu.org/2026/11/cara-setting-dns-di-mikrotik-google.html — including how to set up DNS on MikroTik from scratch and when DNS is actually the problem (and when it is not).