# Sitemap settings

> Canonical source: [Sitemap settings](https://docs.hellowes.com/sitemap-settings/)

WCH writes a fresh sitemap.xml for your site on every publish, using your live domain and the pages it actually published. Three settings shape it: how the sitemap is split, which pages are left out, and whether URLs end in a slash.

## Where to find it

1. Open your project.
2. Go to Settings.
3. Under General settings, find Sitemap structure and Remove trailing slash from URLs.
4. Below General settings, find the Exclude from sitemap.xml section.

All three save as soon as you change them. You do not need Save changes. Only team admins see Settings.

## How WCH builds your sitemap

WCH does not copy the sitemap from your Webflow site. It builds its own from the pages in your project each time it publishes.

- **Every published page is listed**, with a few exceptions below.
- **URLs use your Project domain.** A page at `/about` is listed as `https://www.example.com/about/`. Set Project domain to your live domain, with `https://`. See [Project Settings](/project-settings).
- **Root directory is included.** With a Root directory of `docs`, the same page is listed as `https://www.example.com/docs/about/`, and sitemap.xml is written inside that folder. See [File Prefix and Root directory](/file-prefix-and-root-directory).
- **lastmod is copied from your Webflow sitemap.** When your Webflow sitemap gives a page a `<lastmod>` date, WCH republishes that date as is. Pages without one upstream get no `<lastmod>`. WCH does not use the publish time.
- **Localized pages get hreflang alternates.** When a page exists in several locales, each entry lists every locale version plus an `x-default` that points at your primary locale. See [Localization and hreflang](/localization-and-hreflang).
- **Staging and production get the same file.** The sitemap on your staging site already lists your live URLs.

WCH always leaves out:

- Your 404 page, in every locale.
- Pagination pages such as `/blog/page/2/`. Search engines find them from the list page itself. See [Pagination](/pagination).
- Pages you add to Exclude from sitemap.xml.

## When it runs

WCH rebuilds the sitemap at the end of every publish that renders pages: Publish all pages, Publish selected on Rendering, and publishes started by Webflow or CMS webhooks. The sitemap always lists every page in the project, not only the pages in that publish.

Changes to these settings apply from the next publish. If Cache is on and no page has changed, the publish ends with "All pages are up to date. Nothing to publish." and the sitemap is not rebuilt. To rebuild it, clear the cache for at least one page on the Cache page, then publish again. See [Cache](/cache).

## Sitemap structure

Chooses how the sitemap is split. The dropdown names each option with a short description. The default is Global.

- **Global**: one `sitemap.xml` with every URL. Right for most sites.
- **Per locale**: `sitemap.xml` becomes a sitemap index that points at one sitemap per locale, such as `fr/sitemap.xml` and `de/sitemap.xml`. Pages in a default locale served without a locale folder go in `pages-sitemap.xml`.
- **Per locale & topic**: `sitemap.xml` becomes an index that points at one sitemap per locale and topic. The topic is the first folder after the locale, so `/fr/blog/post` goes in `fr/blog-sitemap.xml`. Home pages go in a sitemap named `root-sitemap.xml`.

A sitemap index is a small file that lists other sitemap files. Search engines read it and follow each link. Each entry in the index carries the newest `lastmod` of the pages in that file. Submit the same `sitemap.xml` URL to search engines whichever mode you choose.

Use a grouped mode when your site is large or multilingual and you want to track indexing per locale or per section in Google Search Console.

## Exclude from sitemap.xml

Leaves specific pages out of the sitemap. The page is still published and still reachable. It is only missing from sitemap.xml.

1. In the Exclude from sitemap.xml section, enter a full URL or a path, for example `/blog/old-post`.
2. Click Add or press Enter. The entry saves immediately.
3. To remove one, click the delete icon beside it. It is removed immediately, with no confirmation.

Rules for matching:

- **One exact page, not a pattern.** `/blog` removes only the `/blog` page, not the posts under it. There are no wildcards.
- **Domain, trailing slash, and index.html are ignored.** `https://www.example.com/blog/old-post/`, `/blog/old-post`, and `blog/old-post/index.html` all match the same page.
- **Not case-sensitive.** `/Blog/Old-Post` matches `/blog/old-post`.
- **Root directory is handled for you.** You can paste a URL straight from your published sitemap, root directory included.
- **Each locale is its own page.** To leave out `/blog/old-post` in every language, also add `/fr/blog/old-post` and so on.
- **No duplicates.** WCH rejects an entry that is already in the list.

Excluding a page does not stop search engines from indexing it. To keep a page out of search results, add a noindex tag to the page in Webflow.

## Remove trailing slash from URLs

Off by default. When on, WCH writes URLs without the trailing slash: `/about` instead of `/about/`. The homepage becomes the bare domain, `https://www.example.com`.

It applies to:

- Every URL in the sitemap, including the hreflang alternates inside it.
- The canonical link on every page.

It does not change where files are saved. The page is still written as `about/index.html`. Turn it on only when your host serves `/about` directly without redirecting to `/about/`. Otherwise the sitemap and canonical links point at a redirect.

## The prefixed copy

When File Prefix is set, WCH also publishes a copy of every sitemap file with the prefix in front of its name. With `assets/`, you get `assets/sitemap.xml` alongside `sitemap.xml`. The content is identical. See [File Prefix and Root directory](/file-prefix-and-root-directory).

## Pointing search engines at your sitemap

WCH does not add a `Sitemap:` line to robots.txt for you. Add one in the Robots.txt field in Settings:

```
Sitemap: https://www.example.com/sitemap.xml
```

Then submit the same URL in Google Search Console.

## Testing your changes

1. Change the setting.
2. Open Rendering, tick one page, and click Publish selected. The sitemap is rebuilt for the whole site.
3. Open `/sitemap.xml` on your staging site and check the URLs, the structure, and that excluded pages are gone.
4. Once it looks right, promote to production.