Shadowrocket Ad Blocking: Rules, Checks and Risks
On this page
What you want to do
Stop some ads from loading: requests from fixed ad domains, in apps or web pages, get blocked at the Shadowrocket level.
The App Store description lists several related features: blocking ads by domain and user agent rules (“Block ads by domain, user agent rules”), importing rule files from a URL or iCloud Drive, URL rewriting and HTTPS decryption.
Where to set it: add a blocking rule
Rules live in your config file; see Shadowrocket rules for the basics. The menu names come from the US App Store screenshots and may differ in your version (untested).
- On the Config tab, tap the config file in use (for example default.conf).
- Tap Add Rule.
- Set the type to domain suffix and enter the ad domain, for example
ads.example.com(just an example, not a real ad domain). - Choose the block action (exact option name untested) and save.
- Use Test Rule with that domain to confirm it matches the rule you just added.
Importing someone else’s ad-block list
Some people publish ad-block rule files you can import from a URL. They’re maintained by third parties, and we don’t recommend any particular source:
- only import from sources you trust and that are actively maintained;
- a list can block too much and break some apps or sites;
- Back up your current config first. If you changed the default config, Restore Default Config puts it back to its original content; for any other config file, restore it from your backup.
What to watch out for
Warning
Some ad-blocking setups ask you to turn on HTTPS decryption and install and trust a certificate on your device. Once it’s on, Shadowrocket can see and rewrite HTTPS content passing through it. Only turn it on if you understand what you’re doing, and never install a certificate from an unknown source or one someone else gives you.
- If it blocks the wrong thing: a broken page layout or an app feature that stops working usually means a rule caught a normal domain. Use Test Rule to find which one, then remove or change it.
- Not every ad can be blocked: when ads and normal content come from the same domain, blocking the domain blocks both.
- No cracks: we don’t cover scripts that unlock paid features or remove in-app purchases.
To recover from broken rules, see Shadowrocket config files.