---
title: "createSitePathResolver()"
description: "Create a function to resolve a path relative to the site within Nitro."
canonical_url: "https://nuxtseo.com/docs/site-config/nitro-api/create-site-path-resolver"
last_updated: "2026-05-25T04:23:23.027Z"
---

Same as [createSitePathResolver()](/docs/site-config/api/create-site-path-resolver) but you will need to provide the request context.

## Usage

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

export default defineEventHandler((e) => {
  const resolvePath = createSitePathResolver(e, {
    canonical: true,
  })

  resolvePath('/about')
  // https://www.example.com/about
})
```
