# Trace URL dispatch from the command line

Source: https://zotonic.com/docs/2934/trace-url-dispatch-from-the-command-line

URI: https://zotonic.com/id/2934

Language: en

Use dispatch inspection to discover why a path selects a particular controller:

```sh
bin/zotonic dispatch garden
bin/zotonic dispatch garden detail
bin/zotonic dispatch garden /welcome
```

The first form lists site rules, the second includes detail, and the third traces a path. You can also pass a full URL to include hostname-based site selection.

Compare the selected rule, controller, options, and any path rewriting with your expectation. Earlier applicable rules can win over a broad catch-all later in the list.

This is a dispatch diagnosis, not a substitute for making the HTTP request and checking authorization and rendering. See [Trace a URL through dispatch](/id/2975) and [A URL reaches the wrong page](/id/3001).

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/2934?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/2934?language=en>)
