---
title: "updateSiteConfig()"
description: "How to update Site Config within Nitro."
canonical_url: "https://nuxtseo.com/docs/site-config/nitro-api/update-site-config"
last_updated: "2026-05-25T06:23:44.096Z"
---

Same as [updateSiteConfig](/docs/site-config/api/update-site-config) but you will need to provide the request context.

<u-badge color="amber" label="Warning">



</u-badge>

When using this, you will to run it as early as possible within the request lifecycle to avoid conflicts. It's
recommended to run this either in a Nitro plugin or a nitro middleware.

## Usage

```ts [serverMiddleware.ts]
import { defineEventHandler } from '#imports'
import { updateSiteConfig } from '#site-config/server/composables'

export default defineEventHandler((e) => {
  updateSiteConfig(e, {
    name: 'My Site',
    url: 'https://example.com',
  })
})
```
