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.
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).
- Connect to the router network (via Wi-Fi or cable).
- Open your browser and type in 192.168.31.1 or miwifi.com. log in (the default login and password is usually admin).
- Go to Additional Settings β Security β Access Control (on some models, the path may differ: Network β Access Control).
- Activate the switch to Enable Access Control.
- 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
- 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
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:
- 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.1The default password is the same as the one used for the web interface (usually admin).
hosts
vi
vi /etc/hosts127.0.0.1 facebook.com
127.0.0.1 www.facebook.comSave the changes (:wq in vi).
rebootThis 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?
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:
| Method | Difficulty | It works with HTTPS. | Flexibility of settings | Post-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.