---
title: "Data Sources · Nuxt Sitemap · Nuxt SEO"
canonical_url: "https://nuxtseo.com/docs/sitemap/getting-started/data-sources"
last_updated: "2026-08-16T10:10:35.728Z"
meta:
  description: "Understand where your sitemap URLs come from."
  "og:description": "Understand where your sitemap URLs come from."
  "og:title": "Data Sources · Nuxt Sitemap · Nuxt SEO"
---

Nuxt SEO on GitHub

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

**Getting Started**

# **Data Sources**

## Where do sitemap URLs come from?

After installing the module, you may wonder: where do the URLs in your sitemap come from?

Every URL belongs to a **source**. There are two types:

- **Application Sources** - Automatically discovered from your Nuxt app
- **User Sources** - Manually provided by you

For most sites, application sources handle everything automatically. You only need user sources when you have dynamic routes from a CMS or database.

## Application Sources

Application sources are automatically generated from your Nuxt application. They provide convenience by automatically discovering URLs from your app's structure, but can be disabled if they don't match your needs.

- `**nuxt:pages**` - Statically analyzed pages of your application (including [`**definePageMeta**`](https://nuxtseo.com/docs/sitemap/advanced/loc-data#modify-loc-data-with-page-meta) sitemap config)
- `**nuxt:prerender**` - URLs that were prerendered
- `**nuxt:route-rules**` - URLs from your route rules
- `**@nuxtjs/i18n:pages**` - When using the `**pages**` config with Nuxt I18n. See [**~~Nuxt I18n~~**](https://nuxtseo.com/docs/sitemap/guides/i18n) for more details.
- `**nuxt-i18n-micro:pages**` - When using the `**pages**` config with Nuxt I18n Micro. See [**~~Nuxt I18n~~**](https://nuxtseo.com/docs/sitemap/guides/i18n) for more details.
- `**@nuxt/content@v2:urls**` - When using Nuxt Content v2. See [**~~Nuxt Content~~**](https://nuxtseo.com/docs/sitemap/guides/content) for more details.
- `**@nuxt/content@v3:urls**` - When using Nuxt Content v3. See [**~~Nuxt Content~~**](https://nuxtseo.com/docs/sitemap/guides/content) for more details.

**Disabling application sources.** You can disable application sources individually or all at once using the `**excludeAppSources**` config option.

```ts
export default defineNuxtConfig({
  sitemap: {
    // exclude all app sources
    excludeAppSources: true,
  }
})
```

## User Sources

User sources allow you to manually configure where your sitemap URLs come from. These are especially useful for dynamic routes that aren't using [**~~prerendering discovery~~**](https://nuxtseo.com/docs/sitemap/guides/prerendering).

You have several options for providing user sources:

### 1. Build-time Sources with `**urls**` Function

For sitemap data that only needs to be updated at build time, the `**urls**` function is the simplest solution. This function runs once during sitemap generation.

It should return an array of path strings or [**~~URL objects~~**](https://nuxtseo.com/docs/sitemap/guides/dynamic-urls#url-structure-reference).

```ts
export default defineNuxtConfig({
  sitemap: {
    urls: ['/about', '/contact', '/products/special-offer']
  }
})
```

### 2. Runtime Sources with `**sources**` Array

For sitemap data that must always be up-to-date at runtime, use the `**sources**` array. Each source is a URL that gets fetched and should return either:

- JSON array of sitemap URL entries
- XML sitemap document

```ts
export default defineNuxtConfig({
  sitemap: {
    sources: [
      // create our own API endpoints
      '/api/__sitemap__/urls',
      // use a static remote file
      'https://cdn.example.com/my-urls.json',
      // hit a remote API with credentials
      ['https://api.example.com/pages/urls', { headers: { Authorization: 'Bearer <token>' } }]
    ]
  }
})
```

You can provide multiple sources, but consider implementing your own caching strategy for performance.

Learn more about working with dynamic data in the [**~~Dynamic URLs~~**](https://nuxtseo.com/docs/sitemap/guides/dynamic-urls) guide.

**3. Dynamic Sources Using Nitro Hooks.** For advanced use cases like forwarding authentication headers or adding sources based on request context, see the [**~~Nitro Hooks documentation~~**](https://nuxtseo.com/docs/sitemap/nitro-api/nitro-hooks#sitemap-sources).

**Was this page helpful?**

### **Related **

[**Dynamic URL Endpoints**](https://nuxtseo.com/docs/sitemap/guides/dynamic-urls)

[**Troubleshooting Nuxt Sitemap**](https://nuxtseo.com/docs/sitemap/getting-started/troubleshooting)

[**Nuxt Robots**](https://nuxtseo.com/docs/robots/getting-started/installation)

[**Installation** Get started with Nuxt Sitemap by installing the dependency to your project.](https://nuxtseo.com/docs/sitemap/getting-started/installation) [**Troubleshooting** Common issues and debugging tips for Nuxt Sitemap.](https://nuxtseo.com/docs/sitemap/getting-started/troubleshooting)