---
title: "getSiteConfig() · Nuxt Site Config · Nuxt SEO"
canonical_url: "https://nuxtseo.com/docs/site-config/nitro-api/use-site-config"
last_updated: "2026-08-16T10:10:32.880Z"
meta:
  description: "How to use Site Config within Nitro."
  "og:description": "How to use Site Config within Nitro."
  "og:title": "getSiteConfig() · 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

**Nitro API**

# **getSiteConfig()**

Access the current site config within a Nitro event handler. Requires an `**H3Event**` as the first parameter.

v4 removed the server helper `**useSiteConfig(event)**` to resolve an auto-import name collision. Use `**getSiteConfig(event)**` instead. Note that `**useSiteConfig()**` without an event parameter is still available in Nuxt app code (client and SSR).

## Usage

serverMiddleware.ts

```ts
import { defineEventHandler } from '#imports'
import { getSiteConfig } from '#site-config/server/composables'

export default defineEventHandler((e) => {
  const siteConfig = getSiteConfig(e)
  console.log(siteConfig.name)
})
```

**Was this page helpful?**

### **Related **

[**useSiteConfig()**](https://nuxtseo.com/docs/site-config/api/use-site-config)

[**updateSiteConfig()**](https://nuxtseo.com/docs/site-config/nitro-api/update-site-config)

[**Nitro Hooks**](https://nuxtseo.com/docs/site-config/nitro-api/nitro-hooks)

[**Nuxt Hooks** Learn how to use Nuxt Hooks to customize your site config.](https://nuxtseo.com/docs/site-config/api/nuxt-hooks) [**updateSiteConfig()** How to update Site Config within Nitro.](https://nuxtseo.com/docs/site-config/nitro-api/update-site-config)