---
title: "Recommended Config · Nuxt Site Config · Nuxt SEO"
canonical_url: "https://nuxtseo.com/docs/site-config/guides/setting-site-config"
last_updated: "2026-08-16T10:10:30.478Z"
meta:
  description: "Learn how to set site config in your Nuxt app."
  "og:description": "Learn how to set site config in your Nuxt app."
  "og:title": "Recommended Config · Nuxt Site Config · Nuxt SEO"
---

Nuxt SEO on GitHub

Switch to Site ConfigSwitch to Nuxt SEOSwitch to RobotsSwitch to SitemapSwitch to OG ImageSwitch to Schema.orgSwitch to Link CheckerSwitch to SEO UtilsSwitch to Skew ProtectionSwitch to AI Ready

**Core Concepts**

# **Recommended Config**

Site config can be set from many different sources from each environment.

For a full list see [**~~how it works~~**](https://nuxtseo.com/docs/site-config/guides/how-it-works).

At a minimum, it's recommended you provide a `**url**`, `**env**` and `**name**` for your site.

## Dev and Live Only

If you only run your site in development and live environments, you can safely set your site config in your `**nuxt.config.ts**` file.

nuxt.config.ts

```ts
export default defineNuxtConfig({
  site: {
    url: 'https://example.com',
    name: 'My Site',
    // ...etc
  },
})
```

## Environment-Specific Site Config

If you have other environments, such as a staging or testing site, then it's recommended to set your site config using environment variables.

```bash
NUXT_SITE_URL=https://test.example.com
NUXT_SITE_NAME="STAGING SITE NAME"
NUXT_SITE_ENV="staging"
```

## Build Time Site Config

If you need to set your site config programmatically, you can use the `**site-config:resolve**` hook with `**updateSiteConfig**` from the kit.

nuxt.config.ts

```ts
import { updateSiteConfig } from 'nuxt-site-config/kit'

export default defineNuxtConfig({
  hooks: {
    'site-config:resolve': () => {
      if (process.env.FOO) {
        updateSiteConfig({
          name: 'Bar',
        })
      }
    },
  },
})
```

**Runtime site config.** Sometimes you need to set your site config programmatically. The module fully supports this, see the [**~~Runtime Site Config~~**](https://nuxtseo.com/docs/site-config/guides/runtime-site-config) guide to learn how.

**Was this page helpful?**

### **Related **

[**How it works**](https://nuxtseo.com/docs/site-config/guides/how-it-works)

[**Runtime Site Config**](https://nuxtseo.com/docs/site-config/guides/runtime-site-config)

[**Understanding Site Config**](https://nuxtseo.com/docs/nuxt-seo/guides/site-config)

[**Troubleshooting** Debug Nuxt Site Config issues using DevTools, config options, and minimal reproductions.](https://nuxtseo.com/docs/site-config/getting-started/troubleshooting) [**How it works** Learn how the Nuxt Site Config module works, so you can get the most out of it.](https://nuxtseo.com/docs/site-config/guides/how-it-works)