September 27, 2026 · Advanced Rules · About 8 min

Shadowrocket REJECT Rules: How Blocking Works, Match Scope, and Limitations

Learn how REJECT blocks requests at the connection level, what DOMAIN-SUFFIX and URL Rewrite can match, and what rule-based blocking cannot do.

At a glance

REJECT denies requests that match a rule; it does not filter page elements. This guide is for users with a working Config who want to add blocking rules. First, set Global Routing to Config. Start with a single DOMAIN rule and check the match in request logs. If you need to target URL paths, check whether URL Rewrite's requirements are met. All example domains and addresses are for syntax demonstrations only and do not refer to real services.

1. What REJECT Does: Blocks Connections, Not Page Elements

Shadowrocket rules combine a match condition with a policy. REJECT is a policy that denies matching requests; it is not a protocol or a server you need to add. A rule can take effect only when the relevant traffic passes through Shadowrocket and is evaluated against the rules in the active Config.

App request Traffic interception Rule matching REJECT match Request denied

Domain rules match the destination domain, not text or images on a webpage or the location of a button. If a page loads analytics from a separate domain, blocking that domain may prevent the resource from loading. But if the page content, login, and images all rely on the same domain, blocking it may break them all. Rules cannot automatically tell which responses contain content you want to keep.

What you see after a request is denied depends on the app that made it. You might see an empty area, a loading error, a retry prompt, or previously loaded content. The page still appearing does not prove the rule failed, and a single loading error does not prove REJECT caused it. Network interruptions, DNS issues, and server errors can look similar.

2. Basic Syntax: Start with DOMAIN Before Widening the Match

A standard domain rule has three fields: a rule keyword, a match value, and a policy, separated by English commas. The standalone example below denies requests to a specific host, then denies a suffix and its subdomains, and sends all remaining requests directly. Add only the rules you need to your existing Config; do not replace your current routing rules with this snippet.

[Rule]
DOMAIN,ads.example.com,REJECT
DOMAIN-SUFFIX,telemetry.example.com,REJECT
FINAL,DIRECT
RuleMatchesDoes not match
DOMAIN,ads.example.com,REJECTads.example.comimg.ads.example.com
DOMAIN-SUFFIX,telemetry.example.com,REJECTtelemetry.example.com and v1.telemetry.example.comnottelemetry.example.com
DOMAIN-SUFFIX,example.com,REJECTexample.com and its subdomainsexample.com.other.invalid

Do not include https://, a port, a path, or query parameters in the match value for DOMAIN or DOMAIN-SUFFIX. https://example.com/banner?id=1 is a URL, not a domain. Adding the whole URL to a domain rule does not enable path-based blocking.

Bottom line: test one host before widening to a suffix

Start with DOMAIN for the specific request host you observed. Once you confirm that the relevant page still works, consider DOMAIN-SUFFIX. Do not block a parent domain that serves multiple functions just to reduce the number of rules.

3. Rule Order and Global Routing: A Correct Rule May Not Be Active

Check Global Routing on Home. To test standard rules in a local Config, select Config. Proxy and Direct are global routing modes; their results do not show whether a REJECT rule in Config works. Scene depends on its own setup and is not simply another name for Config. Then, in Config, confirm that the edited configuration is selected and enabled.

  1. In Config, save a copy of the current configuration, then open the local configuration you want to edit.
  2. Add a narrowly scoped REJECT rule under [Rule]. Avoid creating multiple sections with the same name.
  3. Place exceptions before broader rules that could match them, and keep FINAL at the end of the rules.
  4. Save the changes and confirm the edited Config is active. Return to Home and check that Global Routing is set to Config.
  5. Repeat the target request and check the destination, policy, and matched rule in the request log.
[Rule]
DOMAIN,account.example.com,DIRECT
DOMAIN-SUFFIX,example.com,REJECT
FINAL,DIRECT

This example sets a DIRECT exception for account.example.com, then rejects other requests matching the example.com suffix. Standard rules are evaluated from top to bottom; the first match determines the policy. If the broad suffix rule comes first, the exception below it cannot undo that decision.

4. Where DOMAIN-SUFFIX Ends and URL Rewrite Begins

DOMAIN-SUFFIX does not inspect HTTP paths. If the same host serves both /article/ and /banner/, a domain rule cannot block only the latter. URL Rewrite works with visible HTTP request URLs and the match and handling options it supports. This does not mean it can read every HTTPS path directly.

80
Common default port for HTTP; URL paths are usually not protected by TLS encryption
443
Common default port for HTTPS; paths and query parameters are encrypted
2 approaches
Distinguish destination-domain matching from visible-URL matching

HTTPS paths and query parameters are protected by TLS. Inspecting them usually requires correctly configuring HTTPS decryption for the relevant host, installing a certificate, and trusting it. Adding a URL Rewrite rule alone does not meet these requirements. Some apps may reject this handling because they use certificate pinning or similar mechanisms. Check support for transport paths such as HTTP/3 separately; the port alone does not tell you whether rewriting is possible.

MethodWhat it matchesKey limitation
DOMAIN / DOMAIN-SUFFIXDestination hostnameCannot distinguish paths on the same host
URL RewriteReadable HTTP request URLHTTPS path visibility depends on decryption setup and app behavior
REJECTRequests matched by an earlier ruleDenies requests; does not identify page elements

Certificates and HTTPS decryption change the trust boundary. Do not expand decryption to every host just to try one blocking rule. This guide does not provide a wildcard decryption setup. If you cannot confirm the scope, stick to precise domain rules or use content controls provided by the target app.

5. IP-CIDR and GEOIP: Address Matching Is Not Content Classification

A target may use an IP address directly or rely on shared content delivery infrastructure. Distinguish between a domain rule that cannot match because no hostname is available and an IP rule with too broad a scope. GEOIP checks the region associated with an address; IP-CIDR checks whether an address falls within a specified range. Neither can tell whether a response contains ads or analytics.

[Rule]
IP-CIDR,192.0.2.0/24,REJECT,no-resolve
FINAL,DIRECT

192.0.2.0/24 is a documentation example range, not a real target to block. no-resolve means this IP rule will not actively trigger a domain lookup. It can still match an address if a usable destination IP is already available. It does not disable all DNS or turn an IP rule into a domain rule.

6. Verify and Roll Back: Make Your Checks Repeatable with Request Logs

Change one condition at a time. First note how the page behaves before changing the rules. Add one rule, then reopen the page or repeat the action. If the app reuses an existing connection, the new rule may not affect it. If the content is cached, there may be no new request at all. If needed, close and reopen the app, then use newly generated request logs to verify the result.

  1. Check the destination: Confirm the actual request host. Redirects can change the host, so do not rely only on the address bar.
  2. Check traffic interception: Verify the connection status and Global Routing to ensure the test request uses the active Config.
  3. Check the match: See whether the new request used REJECT. If it did not match, first check rule order, domain spelling, and the active Config.
  4. Check the impact: Test essential features such as login, images, playback, and payments—not just whether the target area disappeared.
  5. Check rollback: Remove or disable the new rule and repeat the request. If the issue goes away, narrow the match scope.

Do not use a single latency test to verify content requests. A successful connectivity test reports only the result for its test target. It does not prove that REJECT matched the target domain or that a page path was handled. If you need to share troubleshooting details, keep the destination host, matched policy, and steps taken; remove subscription URLs, tokens, and other credentials first.

7. FAQ: Why Is Content Still Visible After Adding a Rule?

I added REJECT. Why are the images still there?

First check whether new image requests are being made. Browser or app caches, and resources already downloaded, are not removed when you add a rule. Trigger the load again and check the request host. If the image comes from another domain, use the host in the log rather than blocking the entire parent domain.

Blocking left a blank space. Can I remove it too?

REJECT affects requests; the page layout is controlled by the website or app. A container may remain after its resource fails to load. Do not block unrelated domains just to remove the empty space. First confirm that the target resource was denied, then account for the limits of connection-level rules.

How can I stop only some content from loading when it comes from the same domain?

First remove any suffix rule that affects the domain's other functions. DOMAIN and DOMAIN-SUFFIX cannot distinguish URL paths. Consider URL Rewrite only when the URL is visible and the required handling conditions are met. If the content is embedded in the same API response, blocking the host will usually block legitimate data too.

Why does the rule seem to stop working after a while?

In Config, check that the intended configuration is still selected and that the rule is still there. Then check Global Routing. A remote Config update, switching configurations, or the same content being served by a different host can change the result. If automatic connections are involved, check Settings → On Demand. On Demand controls when a connection starts; it does not replace the matching rules in Config.

Can I block promotional segments in every video?

There is no guarantee. If a segment is combined into the same media stream or already downloaded locally, there may be no separate request to reject. First check whether it comes from a separately identifiable host. If it cannot be distinguished, adding broader REJECT rules is more likely to stop the whole video from playing.

Keep a rule only if it meets all three conditions: the target is clearly defined, the match can be verified in request logs, and normal functionality can be restored. More rules do not mean more accurate coverage. When content cannot be distinguished on its own, stop widening the scope; that is easier to maintain than a long list of speculative suffix rules.

Check Shadowrocket’s official App Store listing and configuration steps

Shadowrocket is a closed-source commercial app sold as a one-time purchase. The App Store is the only place to get it. The developer is Shadow Launch Technology Limited, and the app ID is 932747118. Buying the app does not include a network service plan. This guide assumes you already have your own service and configuration. Shadowrocket is primarily for iPhone and iPad; check the App Store listing for system requirements and purchase availability.

Verify the official App Store listing