Topic guides

geosite.dat Lookup

Load and query geosite.dat categories to see which category and rule type match a domain.

Last updated
geosite.dat lookupgeosite querydomain rule lookupgeosite categories
On this page

When to use it

  • You want to know whether a domain exists in geosite.dat.
  • You need to inspect category size and rule types.
  • You maintain Clash, Mihomo, or sing-box routing rules and need category evidence.

Tip

Choose a local geosite.dat file or the synthetic example, parse it, and check a domain. The tool does not fetch remote files.

Query the file your client actually uses

A domain's Geosite membership depends on the dataset. Maintainers, update dates and attribute filters may differ. This tool inspects the geosite.dat you supply; a result cannot guarantee agreement with a different file loaded by your client.

Open Geosite Inspector, select a real binary geosite.dat, wait for decoding and enter a hostname such as www.example.com. Omit scheme, port and path. Internationalized names can be supplied in their ASCII / Punycode form. Renaming a text rule list to .dat does not convert it into the binary format.

Understand entry types

These fictional entries illustrate matching. They are not a dat file to upload and do not claim that a real Geosite category contains these domains:

Entry type Example value Meaning
Full domain, full example.com This exact domain, not www.example.com
Domain suffix, domain example.net This domain and subdomains, not notexample.net
Keyword, plain demo May match the string across different domain suffixes
Regular expression, regex The actual expression in the file Depends on the expression and what the tool can evaluate

Read the category name, matched entry, type and attributes. A domain may belong to several categories. Matching category A does not prove absence from B. Attribute filtering can also change the subset used by a client, so a category name alone does not determine routing.

A repeatable troubleshooting sequence

  1. Record the version or digest of the client's current data file and query that same file.
  2. Query a domain and then one of its subdomains to distinguish full from domain matching. Compare a similar but unrelated suffix when needed.
  3. Keep diagnostics about unknown expressions or parsing limits. An indeterminate result is not a confirmed non-match. The lookup does not connect to the queried domain.
  4. In the client, check that the same category and attribute subset are enabled and that an earlier rule did not match first. Inspect the connection log for the actual route.

Common misunderstandings

  • The file cannot be decoded: verify that the download is binary data, not a 404 page, login form or archive. Use a trusted source and check size and diagnostics. Changing an extension cannot bypass a format or size limit.
  • The tool matches but the client does not proxy it: membership is only one condition. A different dataset, rule ordering or missing domain observation can change the outcome.
  • You want an IP's country: Geosite is a domain collection. Read GEOIP rules; domain membership does not identify a server's physical location.
  • You want to generate routing rules: use the rule builder, choose an existing target and check core support. Querying the dataset does not modify or publish your client configuration.

For support, provide a redacted hostname, data version, category and diagnostic. A complete client configuration containing subscription secrets is unnecessary.