---
title: "How it works"
description: "Learn how the Nuxt Site Config module works, so you can get the most out of it."
canonical_url: "https://nuxtseo.com/docs/site-config/guides/how-it-works"
last_updated: "2026-08-25T18:37:45.642Z"
---

Site config resolves from the following sources, in order of precedence:

## Build Time

### 1. System

System details relate to the environment the app is running in.

```ts
export default {
  env: import.meta.envName || process.env.NODE_ENV,
}
```

System config derives the `indexable` property at read time from `env` through the `getSiteIndexable()`{lang="ts"} utility, which defaults to `true` when `env` is `'production'`.

### 2. Vendor CI Environment

When deploying to supported platforms, `url` and `name` are automatically populated from platform environment variables. These have low priority and are overridden by any explicit config you provide.

| Platform                       | `url`                               | `name`                          |
| ------------------------------ | ----------------------------------- | ------------------------------- |
| [Vercel](https://vercel.com)   | `VERCEL_URL`, `NUXT_ENV_VERCEL_URL` | `NUXT_ENV_VERCEL_GIT_REPO_SLUG` |
| [Netlify](https://netlify.com) | `URL`                               | `SITE_NAME`                     |
| Cloudflare Pages               | `CF_PAGES_URL`                      |                                 |

::note
As of v4, `site.name` is no longer inferred from your project directory or `package.json`. It will only be auto-populated from CI platform env vars listed above, or from explicit config. See the [v4 release notes](/docs/site-config/releases/v4).
::

3. **Module overrides**: Build time site config provided by modules.
4. **Nuxt Config `site` key**: Site config provided by the user in the Nuxt config.
5. **Runtime Config and Environment Variables**: Site config provided by the user at runtime. `runtimeConfig.public.site` and associated environment variables (e.g. `NUXT_SITE_URL`, `NUXT_SITE_NAME`).
6. **Nuxt Hook**: The `site-config:resolve` hook fires to allow any final build time modifications to the config.

## SSR / Nitro Runtime

1. **Request URL**: The request URL determines the site URL at runtime.
2. **Build Time Site Config**: Config resolved in the build step, stored on `runtimeConfig['nuxt-site-config'].stack`.
3. **Route Rules**: Config resolved from the route rules of the request path, the `site` key. This allows for multi-site support.

## CSR Runtime

In CSR, the browser hydrates site config directly from the SSR-rendered payload sent by the server. This ensures the client has the same config as the server without any hydration mismatches.