What you need
An ESP32-C3 board
Robo Bazar sells one for about ₹200: robobazar.in/product/esp32-c3-mini. Or search “ESP32-C3 SuperMini” on Amazon or Robu.in. Any ESP32-C3 board with 4 MB of flash works. You don't need PSRAM or an “S3” version.A USB-C data cable
Many cheap cables can only charge. If the laptop can't see the board later, try another cable before trying anything else.A laptop or desktop
You need it once, to put the software on the board. Windows, Mac and Linux all work. You'll install VS Code, a free code editor, on it.A place to plug it in
The spare USB port on the back of your router is perfect. An old phone charger works too. Use a steady charger, because a loose one can make the WiFi drop.What it will and won't block
It works like a phone book. When an app asks for an address on the ad list, the chip says “doesn't exist”, so the ad never loads. Anything served from the same address as the content it sits in can't be split off that way.
| Blocks well | Banner and pop-up ads on websites, ads inside many free apps and games, trackers and analytics, and a lot of smart-TV and phone “telemetry”. |
| Can't block | YouTube video ads, Instagram and Facebook sponsored posts, and Hotstar or JioCinema ads in the middle of a stream. They come from the same servers as the videos, so blocking them would block the videos too. No network-level blocker, including the big Pi-hole setups, can remove these. |
Put the ad blocker on the board
This is called “flashing”. You do it once, over USB. After that the chip updates itself over WiFi.
Open it on the laptop. Click the green Code button, then Download ZIP, and unzip it somewhere easy to find.
- Install VS Code from code.visualstudio.com. Then open Extensions on the left, search PlatformIO IDE and click Install. Restart VS Code when it asks.
- Open the project: File → Open Folder, then choose the unzipped esp32-c3-adblock folder. The first time, PlatformIO downloads its tools in the background. That can take 5–10 minutes.
- Set your passwords. In the src folder, copy secrets.example.h and rename the copy secrets.h. Open it and change WEB_PASS and OTA_PASS to passwords of your own. That's your dashboard login later. Leave the WiFi lines as they are, because you'll set WiFi from your phone.
- Add the ad list. Download the project's weekly list from
github.com/M-Abozaid/esp32-c3-adblock/releases/download/blocklist/blocklist.bin
and put blocklist.bin in the project's data folder. - Plug in the board and flash it. Click the PlatformIO (ant) icon on the left. Under c3, click General → Upload and wait for SUCCESS. Then click Platform → Upload Filesystem Image, which copies the ad list, and wait for SUCCESS again.
Connect it to your WiFi
- Plug the board into its home: the router's USB port, or a charger near the router.
- On your phone, open WiFi settings. After a few seconds a new network appears, named C3-AdBlock-XXXX. Join it.
- A setup page pops up. If it doesn't, open any website and it will. Pick your home WiFi, type its password and save. The board restarts and joins your WiFi, and the C3-AdBlock network disappears.
Give it a fixed address
Your devices will be told “ask this address for websites”, so the chip's address must never change.
- Find its address. Open your router's admin page (usually 192.168.0.1 or 192.168.1.1; the login is often on a sticker under the router). Look under Connected devices or DHCP clients for a device whose name starts with esp32c3. Write its IP down, for example 192.168.0.150.
- Reserve it. In the same admin pages, find Address Reservation, DHCP Reservation or Static Lease, and reserve that IP for the chip. This is the step people skip, and it's why “ads came back after a week”.
- Peek at the dashboard. On a laptop, open http://c3adblock.local or http://<its IP>. You'll see live counts of blocked and allowed requests for each device.
Point your devices at it
Try it on one phone first. When you're happy, switch the whole house over.
A · One device, to try it
| Android | Settings → WiFi → tap your network → IP settings: Static → DNS 1 = the chip's IP. Keep the other values it fills in. |
| iPhone / iPad | Settings → Wi-Fi → ⓘ next to your network → Configure DNS → Manual → delete the existing servers and add the chip's IP. |
| Windows | Settings → Network → your WiFi → Hardware properties → DNS server assignment → Edit → Manual, IPv4 on, Preferred DNS = the chip's IP. |
| Mac | System Settings → Wi-Fi → Details → DNS → remove the old entries with − and add the chip's IP with +. |
B · The whole home, the real goal
In the router admin page, find DHCP settings (sometimes under LAN). Set Primary DNS to the chip's IP and save. Then turn WiFi off and on again on each device (or restart them) so they get the new setting. Smart TVs and the kids' tablet are covered too, with nothing to install on them.
Some internet-provider routers (a few JioFiber and Airtel models) lock this setting. If yours does, use option A on the devices that matter most.
Test it. Building it isn't enough.
- Run an ad-block test on a device you switched over: open d3ward.github.io/toolz/adblock and press Start. Before the chip you'll typically see a low score. After, most of the ad and analytics rows turn green.
- Ask it directly. On a laptop terminal (Command Prompt works too), type nslookup doubleclick.net <chip IP>. The answer should be 0.0.0.0. Then try nslookup wikipedia.org <chip IP>, which should give a real address.
- Watch the dashboard at c3adblock.local. Your devices appear with their blocked and allowed counts. In a normal home, 10–30% of all lookups being blocked is common.
Keep the ad list fresh, automatically
New ad domains appear every week. The project rebuilds its list every Monday. To make the chip pull that list by itself:
- On the dashboard, scroll to Blocklist — Remote auto-update.
- Paste this URL and click Save:
https://github.com/M-Abozaid/esp32-c3-adblock/releases/download/blocklist/blocklist.bin - When the browser asks for a login, it's the dashboard login shown below.
Quick fixes
A website or app stopped working
Some sites break when their trackers are blocked. Pause blocking on the dashboard for five minutes. If that fixes it, the default list blocked something that site needs. The default list is chosen to keep WhatsApp and social apps working.
The whole internet stopped working
The chip is off or lost WiFi. Check that it has power (a steady charger, not a loose adapter). To get online straight away, set the device's or router's DNS back to automatic. Fix the chip, then switch back.
The C3-AdBlock network never appeared
Give it 30 seconds after power-on. If it's still missing, the board is probably still on an old WiFi it can reach. Hold BOOT while plugging it in to wipe its saved WiFi and bring the setup network back.
I changed my WiFi password or router
Use Forget WiFi on the dashboard, or hold BOOT while powering on. Then repeat Step 2. You don't need to flash it again.
Ads are back after a few days
The chip got a new IP from the router. Do the reservation part of Step 2, then put the new IP in Step 3.
It's slow, or pages pause before loading
Move the chip closer to the router, or into the router's own USB port. Its tiny antenna is the zig-zag line at the end opposite the USB port, so keep that end away from metal.
How do I undo everything?
Set DNS back to automatic on your devices or router, then unplug the chip. Nothing else on your network was changed.
Most ESP32 ad blockers keep the whole domain list in memory, so they need a bigger, pricier chip. This project stores a tiny 5-byte fingerprint of each domain in the board's storage, in order, and looks each one up in about 18 steps. That's over 100,000 domains using about 50 KB of memory, and each lookup takes about 10 ms. All credit goes to the project's author, Muhammed Abozaid.
Made for the Accidental Engineering reel. Follow along for the next experiment.
Links from the guide
- Buy the ESP32-C3 Mini boardrobobazar.in/product/esp32-c3-mini
- The open-source project by Muhammed Abozaidgithub.com/M-Abozaid/esp32-c3-adblock
- The weekly ad list (blocklist.bin)github.com/M-Abozaid/esp32-c3-adblock/releases
- VS Code, then add the PlatformIO IDE extensioncode.visualstudio.com
- Ad-block test paged3ward.github.io/toolz/adblock
Built on esp32-c3-adblock by Muhammed Abozaid, released under the MIT licence. Full instructions and troubleshooting are also in the downloadable PDF.