---
sidebar_label: baseUrl
---

# server.baseUrl

- **Type:** `string | string[]`
- **Default:** `undefined`

Uniformly set the server-level routing prefix (often used in the case of shared domain names to distinguish traffic).

```ts title="modern.config.ts"
export default defineConfig({
  server: {
    // All generated routes are automatically prefixed with `/base`
    // Path to the generated server-side route file: dist/route.json
    baseUrl: '/base'

    // Multiple baseUrl
    baseUrl: ['/base-new', '/base-old']
  }
})
```

After `dev`, you can see that the routed access will be prefixed accordingly:

```bash
App running at:

  > Local:    http://localhost:8080/base/
  > Network:  http://192.168.0.1:8080/base/
```
