Reading tip
Identify the scenario first, then follow the checks in order. Jump to the linked download, subscription or configuration page when the issue becomes specific.
Rule Order Matters
Clash and Mihomo usually evaluate rules from top to bottom. Once a rule matches, later rules are skipped. Put specific domain and app rules before broad fallbacks, and keep MATCH last.
Common Template
rules:
- DOMAIN-SUFFIX,example.com,PROXY
- DOMAIN-KEYWORD,example,DIRECT
- GEOIP,CN,DIRECT
- MATCH,PROXYPROXY and DIRECT must match actual proxy group or outbound names in your profile.
Rule Provider Example
rule-providers:
direct-domain:
type: http
behavior: domain
url: https://example.com/direct.yaml
path: ./rules/direct.yaml
interval: 86400
rules:
- RULE-SET,direct-domain,DIRECT
- MATCH,PROXYThe URL is only a placeholder. Do not copy an unknown rule provider URL into a production profile.
Application Routing Tips
- Separate streaming, office, gaming and download traffic so problems are easier to trace.
- Prefer domain rules first; use process or IP rules only when necessary.
- Test after each rule group instead of importing a large unknown rule set at once.
When Routing Does Not Match
- Check logs to see which rule matched the current domain.
- Confirm proxy group spelling and capitalization.
- Confirm DNS mode is not hiding the expected domain or IP.
- Move more specific rules closer to the top.