How to block a site on the Xiaomi router: 3 ways with step-by-step instructions

You may need to block certain sites on your Xiaomi router for a variety of reasons, from protecting children from unwanted content to restricting access to social networks during working hours. Unlike blocking at the browser or device level, setting up on a router allows you to close the site to all connected gadgets β€” phones, tablets, computers and even smart TVs.

In this article, we will discuss three main ways to block sites on Xiaomi routers (including Mi Router models). 4A/4C/4Q/AC2100 Others: through the web interface, the Mi WiFi mobile app and the hosts file (for advanced users), you will also learn how to bypass the lock if it was configured accidentally, and what limitations each method has. some functions may differ depending on the version of the router firmware - current screenshots and commands are given for MIUI Router OS 2026.

1.Preparation: Checking the router model and firmware version

Before you start blocking sites, make sure your router supports this feature. Some budget models (such as Xiaomi Mi Router 3G) have a stripped-down functionality to check compatibility:

  • πŸ” Look at the model on the sticker on the lower panel of the router (for example, R3G, R4A).
  • πŸ“± Open the Mi WiFi app (available for Android and iOS) and go to Device β†’ Router.
  • 🌐 Enter 192.168.31.1 (or miwifi.com) in your browser, log in and check the firmware version in the Status menu.

If the firmware version is older than 2022, we recommend updating it through Settings β†’ Software Update. This will add support for new features, including extended parental controls. Please note that after the update, the router will restart, and all connected devices will temporarily lose access to the network.

πŸ“Š What kind of Xiaomi router do you have?
Mi Router 4A
Mi Router 4C
Mi Router AC2100
Mi Router AX1800
Other

2. Method 1: Blocking sites through the router's web interface

The most reliable method is the use of a built-in web interface, which works on all modern Xiaomi routers and allows you to block sites by both domain name (vk.com) and keywords in the URL (game, torrent).

  1. Connect to the router network (via Wi-Fi or cable).
  2. Open your browser and type in 192.168.31.1 or miwifi.com. log in (the default login and password is usually admin).
  3. Go to Additional Settings β†’ Security β†’ Access Control (on some models, the path may differ: Network β†’ Access Control).
  4. Activate the switch to Enable Access Control.
  5. In the Blacklist box, add the domains of the sites you want to block (one per line). Examples: facebook.com *.torrents.ru web.telegram.org
  6. Click Save and restart the router (button in the upper right corner).

Important: a symbol in front of a domain (e.g.,.vk.com) blocks all subdomains, including mobile versions of the site. If a site uses HTTPS, the blocking may not work, in which case alternative methods will have to be used (see section 4).

β˜‘οΈ Checking the blocking of the site

Done: 0 / 4

3. Method 2: Using the Mi WiFi application

The Mi WiFi mobile application is convenient for quick setup, but has limited functionality compared to the web interface. However, blocking sites through it takes less time.

  • πŸ“² Install Mi WiFi from the App Store or Google Play (it’s free but requires registration in the Xiaomi ecosystem).
  • πŸ”— Connect to your router's network and open the app. On the home screen, select your router.
  • πŸ”’ Go to the Security section β†’ Parental Control (or Network Management) β†’ Blacklist on older versions).
  • πŸ“ Add sites to the block list, and you can specify not only the domains, but also the domains. IP-Addresses (e.g. 142.250.186.46 to block Google).
  • ⏱️ Set up a lock schedule (for example, from 22:00 to 7:00) or leave round-the-clock mode.

The advantage of this method is the ability to block sites for individual devices on the network, for example, you can only block access to social networks on a child’s phone without restricting other gadgets, but the application does not support blocking by keywords and may not work with some router models (for example, Xiaomi AIoT Router AC2350).

πŸ’‘

If the Mi WiFi app doesn’t find your router, try resetting it to factory settings (reset button on the back) and reconnecting.

Method 3: Blocking through hosts file (for advanced)

This method is suitable if previous methods did not work (for example, due to HTTPS or firmware features).It involves editing the hosts system file on the router itself, which requires access over SSH.

Instructions:

  1. Turn it on. SSH-Access on router: Go to the web interface at 192.168.31.1. Go to Additional settings β†’ Systemic tools β†’ SSH. Activate the switch and save the settings.

SSH

PuTTY

ssh root@192.168.31.1

The default password is the same as the one used for the web interface (usually admin).

hosts

vi

vi /etc/hosts
127.0.0.1 facebook.com


127.0.0.1 www.facebook.com

Save the changes (:wq in vi).

reboot

This method blocks sites at the level of DNS, This is why it works even for HTTPS-However, it requires command line knowledge and can be canceled after the router is reset to factory settings.

What if the router does not load after editing hosts?
If the router stopped responding after changing hosts, connect to it via cable and reset via holding the Reset button (10 seconds).

5.Blocking bypass: how to unblock a site

If you accidentally blocked the desired resource or forgot the password from the router, there are several ways to return access:

  • πŸ”„ Reset your router to factory settings (reset button on the back). note that this will remove all settings, including the Wi-Fi password.
  • πŸ”‘ If you remember the password, go to the web interface (192.168.31.1) and delete the site from the blacklist in the Access Management section.
  • 🌍 Use it. VPN Or a proxy on the device to get around the lock at the router level, like the ZenMate or Hola browser extensions.
  • πŸ“± Change. DNS-servers on a device to public (e.g. 8.8.8.8 from Google or 1.1.1.1 from Cloudflare).

⚠️ Note: If the router is blocked by the provider (for example, at the request of Roskomnadzor), none of these methods will help.-VPN.

6.Comparison of blocking methods: which one to choose

Each method has its pros and cons, and in the table below we compare them by key parameters:

MethodDifficultyIt works with HTTPS.Flexibility of settingsPost-reset reset
Web interface⭐⭐❌ No.High (keywords, schedule)❌ No.
Mi WiFi appendix⭐❌ No.Medium (domains only)❌ No.
Editing by hostsβ­β­β­β­βœ… Yes.High (any domains and IP)❌ No.
Resetting DNS on the deviceβ­βœ… Yes.Low (only bypass)βœ… Yes.

For most users, the best solution is a web interface that combines simplicity and flexibility. The method with hosts is suitable for those who are ready to understand the settings and need to lock. HTTPS-Mi WiFi is easy to change quickly, but does not support advanced features.

πŸ’‘

If you only need to block a site on one device (like a child’s phone), use the built-in parental controls on Android or iOS instead of the router’s settings.

Frequently asked questions

Can I block a website for only one device on the network?
Yeah, but not through the standard router settings. MAC-device address IP customized DHCP (Settings β†’ Local area network β†’ DHCP). Create a locking rule for this IP Or use the Mi WiFi app, which has a function to link restrictions to specific gadgets.
Why does the website open after blocking?
Probable reasons: The site uses HTTPS β€” the standard lock through the web interface does not work. You specified the wrong domain (for example, vk instead of vk.com). The router did not restart after saving the settings. The device uses alternative DNS (for example, Google DNS). Solution: try the method with editing hosts or configure lock at the device level.
How to block all sites except the permitted ones (white list)?
Xiaomi routers do not have a whitelist feature by default, but it can be emulated: In the web interface, go to Access Management. Enable the option to Allow access only to specified sites (if you have one in your firmware). If this option is not available, block all sites through hosts except those that you need to leave (specify their IP directly). For a full whitelist, purchase a router with OpenWRT support (for example, Xiaomi Mi Router 3G with custom firmware).
Will the lock work if you connect to the router via the guest network?
No. Guest networks (Guest Wi-Fi in settings) usually have separate access rules, and if you set up a lock on the main network, it won't spread to the guest network, and if you block sites there, repeat the settings for the guest network or turn it off altogether.
Can I block sites on the Xiaomi router without access to its settings?
Not if you don't have access to the web interface or the Mi WiFi app. Alternatives: Set up lock on the device itself (e.g. hosts on Windows or Android). Use third-party programs like Cold Turkey or Freedom. Contact your provider - some operators (e.g. Rostelecom) provide Parental Control at the Internet connection level.