If you already have a working configuration and only want to block connections to a known host, add a DOMAIN rule to a copy of your configuration. In Home, confirm that Global Routing is set to Config, then test both the target and the features you want to keep. This guide explains when to use a domain suffix, how to order exceptions, and how to undo a rule that blocks too much.
Where REJECT Takes Effect
REJECT is the action taken when a rule matches; it is not a rule type for identifying a target. For example, DOMAIN specifies which host to match, while REJECT determines that the connection is denied after a match. The app may show a connection error, retry, or eventually time out. These messages come from the app, so an error message alone does not confirm that a rule matched.
The steps below use an existing configuration on an iPhone or iPad. Check which configuration is selected on the Config page, then check the connection toggle and Global Routing on Home. To verify configuration rules, select Config; do not treat results in Proxy or Direct mode as evidence that this rule matched. If you normally use Scene, switch to Config for a controlled test, then restore your usual setting afterward.
How to Write DOMAIN and DOMAIN-SUFFIX Rules
Enter the rule type, match value, and policy in that order, separated by English commas. Use a hostname as the match value; do not include https://, a path, or a port. The domains below are examples only. When adding an example line to an existing [Rule] section, do not add the section header again or replace your entire rule set with the examples.
[Rule]
DOMAIN,telemetry.example.com,REJECT
DOMAIN-SUFFIX,metrics.example.com,REJECT
Exact Host Match
- Type
DOMAIN- Match value
telemetry.example.com- Matches
telemetry.example.com- Does not match
v2.telemetry.example.com
If you know there is only one host to block, start with an exact match.
Domain Suffix Match
- Type
DOMAIN-SUFFIX- Match value
metrics.example.com- Matches
metrics.example.com、v2.metrics.example.com- Does not match
othermetrics.example.com
Suffix matching follows domain boundaries; it does not match an arbitrary string at the end of a hostname.
Check Whether the Host Is Shared
If the requests you want to block and the features you want to keep use the same host—for example, if they differ only by the /events and /login paths—do not add a rule to block the entire host. Neither of the rule types above distinguishes URL paths on the same host.
Rule Order: Exceptions First, FINAL Last
Rules are checked in order, and the first matching rule determines the policy. A more specific match does not automatically have higher priority: if a broad suffix rule comes first, a later exact-match rule cannot override it. FINAL sets the policy for traffic that did not match an earlier rule, so keep it at the end of the rule list.
[Rule]
DOMAIN,login.example.com,DIRECT
DOMAIN-SUFFIX,example.com,REJECT
FINAL,PROXY
login.example.commatches the first line and usesDIRECT. Move the suffix rule to the top, and it will instead matchREJECT.api.example.comdoes not match the first line, so it matches the second and is denied. If this host is also used to load account details after login, the page may still fail to open even if the login request itself succeeds.- Only targets that do not match either of the first two lines reach
FINAL,PROXY. This illustrates rule order; when editing, keep the existing fallback policy, and use the host's original policy for exceptions rather than changing them all toDIRECT.
Before adding rules to an existing configuration, check whether an earlier rule already covers the target. For example, if DOMAIN-SUFFIX,example.com,PROXY appears earlier, adding a rule to reject api.example.com below it will not change the result. Placing the exact-match rule before the broad match is easier to verify and undo than reordering the entire existing rule set.
Compare the Target Request with Features You Need to Keep
- Keep a baseline. Save the original configuration and note its current
Global Routingmode. On the same network, test the target feature once with a configuration that does not include the new rule, then test a feature you need to keep—for example, opening your account page after logging in. If the target already fails, investigate the cause before attributing it to the new rule. - Change one rule at a time. Add an exact
DOMAINrule to a copy of the configuration, select that copy, and keepConfigmode enabled. Make a fresh request rather than judging from a page that is already loaded; cached content or an existing connection may make it look as though nothing changed. - Record what changed. Note the hostname, action, and result for both the target and the feature used for comparison. If the corresponding entries appear in the connection log, check the actual host and policy. If there is no matching entry, do not treat a page load failure as proof that
REJECTmatched. - Switch back to confirm. If a feature you need also fails, switch to the original configuration and repeat the action on the same network and routing mode. If the original configuration works and the copy reproduces the issue, check the new rule's scope and order. If both configurations fail, investigate the network or the app's service first.
Common Issues: Rules Not Blocking, Accidental Blocks, and Limitations
Why does the page still open after I added a REJECT rule?
First check the connection toggle on Home, confirm that Global Routing is set to Config, and verify the selected file in Config. Make a fresh request and check whether the actual hostname matches the rule. A page and its images may use different hosts, and cached content may still appear; focus on the target request when troubleshooting.
What should I do if a suffix rule breaks login or verification?
Remove the new suffix rule from a copy of the configuration, or switch back to the original configuration, then retry the same login steps. If the feature works again, block only the host you have confirmed. If you need to keep the suffix rule, add exceptions for hosts that must remain accessible above it, using each host's original outbound policy.
The connection log shows only an IP address. Can I use IP-CIDR instead?
IP-CIDR matches an address range; for example, the IPv4 address 192.0.2.8/32 represents a single address. Even a single-address rule may affect multiple domains that share that address. First confirm that the address is dedicated to the target. If a domain rule does not match, do not respond by blocking an entire address range.
Can I block a specific image or API endpoint on the same HTTPS host?
The domain rules in this guide cannot distinguish requests by path. For example, if two requests both go to HTTPS port 443 on cdn.example.com, one for an image and one for an app resource, the domain rule matches them identically. When a host is shared this way, keeping it accessible is safer than widening the block.