Xiaomi routers ship with your ISP's DNS servers pre-configured — and most ISP resolvers are slow, geographically distant, and log every hostname your devices query. Whether you're after faster page loads, privacy, or parental-control filtering, changing DNS at the router level covers every device on your network in one step. The catch: Xiaomi has shipped three distinct admin UI generations, and the 2024–2026 MiWifi 4.x firmware overhaul moved DNS out of "Common Settings" entirely. This guide covers every current path: the new 4.x web panel, legacy 3.x interface, the MiWifi mobile app, SSH command line, and OpenWrt for flashed devices.
Why ISP DNS Is Slowing You Down
When you type a URL, your device asks your router for the IP address. The router forwards that query to whatever DNS resolver it has configured — by default, whatever your ISP provided via DHCP during line provisioning. ISP resolvers have well-documented problems: aging infrastructure, shared query load with every subscriber in your region, and geographic distance from Cloudflare or Google's anycast nodes. The latency gap between an ISP resolver and Cloudflare 1.1.1.1 is typically 30–150 ms per query; with dozens of DNS lookups per page load, that accumulates fast.
Beyond speed, ISP resolvers frequently implement DNS hijacking — returning a branded landing page for non-existent domains instead of a clean NXDOMAIN, and sometimes filtering specific domains entirely. Switching to a public resolver eliminates both behaviors. Doing it at the router level means every phone, laptop, TV, and IoT device on your network gets the benefit immediately without per-device configuration.
Identify Your MiWifi Firmware Version First
Getting the correct steps requires knowing which firmware generation you have. Three branches are currently in the field:
- MiWifi 4.x (2024–2026): White minimal interface with a left icon-tab sidebar. Current on BE3600, BE6500, AX9000 updated builds, and most models shipping since 2025. Default gateway: 192.168.31.1.
- MiWifi 3.x (2021–2024): Orange and blue top navigation bar with a "Common Settings" dropdown in the upper-right corner. Still running on many AX1800, AX3600, R3, R4, and R4C units that haven't received a 4.x OTA upgrade.
- OpenWrt or Padavan (community firmware): Completely different interface — LuCI at 192.168.1.1. Skip the stock paths below and jump to the OpenWrt section.
To identify your version: navigate to http://192.168.31.1 or http://miwifi.com (Xiaomi's router-local DNS alias — it resolves to the router itself, not the public internet). The firmware version string appears in the page footer or under System → About.
Method 1: MiWifi 4.x Web Panel (Current Firmware)
The 4.x redesign moved DNS out of "Common Settings" and into the WAN configuration pane. The toggle to enable manual DNS is easy to miss because it defaults to hidden when auto-assign is active.
- Open http://192.168.31.1 in any browser on a device connected to the Xiaomi network, wired or wireless.
- Log in with your admin password. If forgotten, hold the reset button on the router base for 8 seconds — this factory-resets the unit and you'll need to re-enter your ISP connection credentials.
- In the left sidebar, click Internet (globe icon). If multiple tabs appear at the top of the right pane, select WAN.
- Scroll to the DNS Settings block. The default shows either 0.0.0.0 (auto-assigned from ISP DHCP) or your ISP's actual resolver address.
- Toggle off Automatic DNS — the switch or checkbox labeled "Auto" or "ISP-assigned" depending on your locale.
- Fill in both resolver fields:
- Primary DNS: 1.1.1.1 (Cloudflare) or 8.8.8.8 (Google)
- Secondary DNS: 1.0.0.1 (Cloudflare) or 8.8.4.4 (Google)
- Click Save or Apply. The router briefly renegotiates the WAN connection — 1 to 3 seconds. Your LAN stays connected throughout.
If the DNS section isn't visible under the WAN tab, check Advanced → Network → DNS Server. Some regional firmware builds — particularly Chinese domestic variants sold before 2025 — label the section differently or place it in Advanced rather than the main WAN view.
Method 2: MiWifi 3.x Web Panel (Legacy Interface)
The older orange-bar firmware uses a completely different navigation hierarchy. DNS is not in the same location as 4.x and the toggle behaves differently depending on your WAN type:
- Log in at http://192.168.31.1.
- In the orange top navigation bar, click Common Settings (常用设置 in Chinese-locale builds) — a dropdown on the right side of the bar.
- Select Internet Settings (网络设置).
- Find the DNS section and enable the Manual DNS toggle.
- Enter Primary and Secondary DNS addresses and click Apply.
If the DNS section is absent under Internet Settings, navigate to Advanced → DNS Settings instead — some 3.x sub-versions placed it there. On firmware 3.0.34 and earlier, the Manual DNS toggle only appears when the WAN connection type is set to PPPoE or Static. If you're on DHCP WAN and the option is missing, use the SSH method described below.
Method 3: MiWifi App (iOS and Android)
The MiWifi app supports DNS changes but buries the setting further than the web panel:
- Open the MiWifi app with your phone connected to the Xiaomi router's network.
- Tap your router's name to open its management dashboard.
- Tap More — the three-line menu icon, usually top-right.
- Navigate to Advanced Settings → WAN Settings.
- Toggle off Auto DNS, enter your resolver IPs, and tap Save.
The app version typically lags 1–2 firmware revisions behind the web panel in terms of exposed settings. If WAN DNS settings aren't visible in the app, use the browser-based panel instead — both interfaces write to the same underlying configuration file, so there's no conflict risk from switching methods mid-setup.
IPv6 DNS: The Setting Most People Miss in 2026
If your ISP provides IPv6 — increasingly standard as carrier-grade NAT is phased out across North America and Europe — your Xiaomi router is distributing DHCPv6 nameservers to every device on your LAN independently of the IPv4 DNS you just configured. Changing only IPv4 DNS means IPv6-connected devices still forward AAAA record lookups to your ISP's resolver, bypassing your change for roughly half of all modern DNS traffic.
To set IPv6 DNS in MiWifi 4.x:
- Under Internet, click the IPv6 tab.
- Change DNS Mode to Manual.
- Enter the IPv6 resolver addresses:
- Cloudflare: 2606:4700:4700::1111 primary, 2606:4700:4700::1001 secondary
- Google: 2001:4860:4860::8888 primary, 2001:4860:4860::8844 secondary
- Save and verify using the CLI commands in the next section.
In MiWifi 3.x, IPv6 DNS lives under Advanced → IPv6 → DNS Server. Many AX1800 and R-series models on 3.x firmware don't expose IPv6 DNS in any UI panel — for those devices, SSH is the only available method.
Method 4: SSH and UCI Command Line
Xiaomi routers run a stripped OpenWrt-based Linux stack with dnsmasq handling LAN DNS forwarding. SSH is disabled by default but can be enabled under Advanced → SSH in the web panel. On BE-series models from 2024 onward, Xiaomi added a developer-unlock requirement — you must submit your router's serial number at the MiWifi developer portal to receive a time-limited SSH credential.
This writes persistently to /etc/config/dhcp and survives reboots. For IPv6 resolver configuration via CLI:
OpenWrt on Xiaomi Hardware
Popular Xiaomi models with strong OpenWrt community support include the AX3600, AX6000, R3, R4, and R4C. After flashing, the admin URL changes to http://192.168.1.1 — note the different subnet from stock MiWifi. DNS is configured through LuCI:
- Navigate to Network → DHCP and DNS → General Settings.
- In the DNS forwardings field, add your resolver IPs one per line.
- Save and apply. The change takes effect immediately without a full reboot.
For DNS-over-TLS — which stock MiWifi firmware does not support natively — install the stubby package on OpenWrt and configure it to forward to Cloudflare's DoT endpoint (1dot1dot1dot1.cloudflare-dns.com) on port 853. This encrypts the router-to-resolver leg, which stock firmware leaves as plain UDP port 53 even when pointing at Cloudflare. DD-WRT has limited Xiaomi model support; if you're running it, DNS forwarders are under Setup → Basic Setup → Static DNS fields.
Verifying the Change Worked
Don't rely on the web panel's "Saved" confirmation. Verify from a connected device using the CLI tools below. One important note before you run these: your router will always appear as the DNS server from a device's perspective (192.168.31.1) — that's dnsmasq proxy behavior and is correct. What you're verifying is what the router forwards to upstream.
Use the DNS Lookup tool to run a live authoritative query from outside your network and confirm external resolution is working as expected after the resolver switch.
Common Misdiagnoses and Gotchas
- Saved but devices still query ISP DNS: Devices cache their DHCP lease including the DNS server IP. Until the lease expires — typically 24 hours — cached clients won't pick up the new upstream. Force-renew immediately: Windows, run
ipconfig /release && ipconfig /renew; macOS, toggle Wi-Fi off and on; iOS/Android, forget and rejoin the network. - "dig shows 192.168.31.1 — it didn't work": Incorrect diagnosis. 192.168.31.1 is the dnsmasq proxy address and is always expected as the reported server. Use
dig whoami.cloudflare.com TXT @1.1.1.1to confirm Cloudflare is actually receiving forwarded queries from your router. - Certain sites still blocked after the change: Some ISPs operate transparent DNS proxies on port 53 that intercept all outbound DNS queries regardless of configuration. Test with
dig google.com @1.1.1.1 +tcp— if TCP returns results but standard UDP queries are still returning ISP results, you're being proxied. Fix: DNS-over-TLS on port 853 via OpenWrt and stubby, or route DNS through a VPN tunnel. - Mesh satellite nodes not reflecting the change: On Xiaomi Mesh systems (AX3000T Mesh, BE7000 Mesh), DNS is configured on the primary node only and propagates to satellites automatically. Setting DNS directly on a satellite node has no effect. If satellites haven't updated after several minutes, reboot them after confirming the primary has the correct settings.
- miwifi.com stops resolving after the DNS change: miwifi.com resolves to 192.168.31.1 only through the router's own dnsmasq. If the alias stopped working, access the admin panel directly at http://192.168.31.1.
- Change reverted after OTA firmware update: Xiaomi major-version OTA updates occasionally reset WAN configuration to defaults. Re-check the DNS settings pane after every firmware update.
Best Public DNS Resolvers for 2026
All major public resolvers now support DNSSEC validation and run anycast infrastructure for low-latency global coverage. For a full technical breakdown of how anycast routing and DNSSEC validation interact, the Google Public DNS documentation is the most comprehensive public reference available.
- Cloudflare 1.1.1.1 / 1.0.0.1: Fastest in independent benchmarks across most regions. Privacy policy commits to no query-level IP logging beyond 25 hours. Full DoH and DoT support. Best general-purpose choice.
- Google 8.8.8.8 / 8.8.4.4: Extremely reliable with excellent global uptime history. Longer data retention policy than Cloudflare but well-documented. Strong secondary choice for reliability.
- Quad9 9.9.9.9 / 149.112.112.112: Actively blocks malicious and phishing domains using threat intelligence from 25+ security vendors. Adds 5–15 ms latency versus Cloudflare but provides real-time protection. Ideal for family networks or small offices.
- NextDNS: Fully customizable — per-device policies, granular blocklists, query analytics dashboard. Free tier covers 300k queries per month. Assign the resolver IPs from your NextDNS dashboard directly into the Xiaomi DNS fields.
Preventing DNS Settings From Being Overwritten
Two scenarios cause Xiaomi DNS settings to silently revert: OTA firmware updates and ISP DHCP changes. After every firmware update — visible under System → Update — navigate back to the DNS settings pane and confirm your resolvers are still saved. If your ISP changes their DHCP offer during infrastructure upgrades, the "Auto" DNS toggle may re-enable itself.
For Xiaomi Mesh deployments, note that the primary node is the sole DNS configuration point — if you replace the primary or add a new node as the mesh root, re-apply DNS settings on the new primary before trusting the network. On SSH-configured devices, the UCI-written settings in /etc/config/dhcp survive in-place firmware upgrades when configuration preservation is enabled during the flash, but always re-verify after any update regardless.
DNSSEC and DoH Status on MiWifi in 2026
Stock MiWifi firmware as of mid-2026 validates DNSSEC when forwarding to a DNSSEC-capable upstream resolver — both Cloudflare and Google qualify. However, the router-to-resolver leg runs over plain UDP port 53 and is unencrypted. Your ISP can observe which hostnames your router queries upstream even if DNSSEC prevents response tampering.
For the full encrypted DNS chain, the practical path today is OpenWrt with the stubby package configured for DNS-over-TLS on port 853. Xiaomi has announced native DoH support for BE-series hardware in a future MiWifi 4.x release, but as of mid-2026 this remains in closed beta and is not available on stable channels. Watch your model's entry in the MiWifi release notes for a public rollout date.