# sitemapXml Reference

The `sitemapXml` function generates a `sitemap.xml` file for your Next.js application.

## Parameters

The `sitemapXml` function accepts one optional parameter: an array of route configuration objects.

### `sitemapConfig`

**type:** `SitemapConfig[]`

**Added in:** `seo-in-nextjs@1.0.0`

An array of route configuration objects. Each object can contain the following properties:

#### `route` (required)

**type:** `string`

**Added in:** `seo-in-nextjs@1.0.0`

The route path for the page (e.g., `/about`, `/blog/post-1`).

#### `lastModified`

**type:** `string | Date`

**Added in:** `seo-in-nextjs@1.0.0`

The date when the page was last modified.

#### `changeFrequency`

**type:** `'always' | 'hourly' | 'daily' | 'weekly' | 'monthly' | 'yearly' | 'never'`

**Added in:** `seo-in-nextjs@1.0.0`

How frequently the page is likely to change.

#### `priority`

**type:** `number`

**Added in:** `seo-in-nextjs@1.0.0`

The priority of this URL relative to other URLs on your site. Value must be between 0.0 and 1.0.

#### `alternates`

**type:** `{ languages?: Languages<string> }`

**Added in:** `seo-in-nextjs@1.0.0`

Language alternates for the page.