> For the complete documentation index, see [llms.txt](https://hmdc.gitbook.io/r/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hmdc.gitbook.io/r/bestpractices/routes.md).

# Adding routes

In web applications, a **route** is the relative path after the hostname.

In `https://www.example.com/a/b/c`, the route is `/a/b/c`.

In `https://www.example.com/a/b`, the route is `/a/b`.

R can display different content or widgets depending on the URL path when using the [shiny-router](https://appsilon.com/shiny-router-package/) package, installable via cran.

```r
packages.install("shiny-router")
packrat::snapshot()
```
