# Sitemap

SleekRank adds every generated page to one sitemap, so search engines can find
them: the sitemap of the first supported provider it finds.

## Supported sitemap providers

Rank checks for these in order and uses the first that is active:

1. **The SEO Framework**: the generated URLs are added to its sitemap
2. **Yoast SEO**: a separate `/sleek-rank-sitemap.xml` (continued in
   `/sleek-rank-sitemap2.xml` and so on for large sets) is listed in Yoast's
   sitemap index
3. **Rank Math**: the same `/sleek-rank-sitemap.xml` files, listed in Rank
   Math's sitemap index
4. **All in One SEO**: the generated URLs are added to its sitemap as
   additional pages
5. an integration another plugin registers through the
   `sleekRank/register/sitemapIntegrations` action (see
   [Hooks](/docs/rank/hooks.md))
6. **WordPress core sitemaps**: a `sleekrank` provider at
   `/wp-sitemap-sleekrank-1.xml`, listed in `/wp-sitemap.xml`

Other SEO plugins, such as SEOPress or Slim SEO, are not supported. With one
of them, Rank falls back to WordPress core sitemaps, which those plugins may
switch off.

Rank checks only whether a plugin is active, not whether its sitemap is
turned on. If the first active plugin in the list has its sitemap switched
off, Rank does not fall back to another provider, and the generated pages
appear in no sitemap.

## Sitemap settings

Each page group has its own settings on its **Sitemap** page:

- **Include generated pages in sitemaps**: whether the group's URLs are
  listed, on by default
- **Priority**: a value from 0.0 to 1.0, 0.5 by default
- **Change frequency**: always, hourly, daily, weekly, monthly, yearly or
  never, weekly by default

## What an entry holds

When the sitemap is requested, Rank goes through every published page group
with sitemaps enabled and adds one entry for every slug in the group's cached
rows. A group whose data has not been loaded adds nothing, so reload a new
group's data before checking the sitemap. Each entry holds:

- **URL**: the full generated URL, always with a trailing slash
- **Last modified**: the base page's last modification time
- **Priority** and **Change frequency**: the group's settings

The SEO Framework receives only the URL and the last-modified date of each
entry.

Yoast SEO, Rank Math and WordPress core split the URLs into files of 2,000 by
default, WordPress core's sitemap limit; the `sleekRank/sitemap/urlsPerSitemap`
filter changes the number.

## Base pages

The base page of a published group carries a `noindex` robots tag. With
WordPress core sitemaps and The SEO Framework, Rank also leaves those base
pages out of the page sitemap. With another SEO plugin, check its sitemap for
your base pages.

## Checking your sitemap

After the groups' data is loaded, open the sitemap of the provider Rank uses:
`/sleek-rank-sitemap.xml` with Yoast SEO or Rank Math,
`/wp-sitemap-sleekrank-1.xml` with WordPress core sitemaps, or the SEO
plugin's own sitemap with The SEO Framework and All in One SEO, and look for
URLs that match your page groups' patterns.

To see the entries without a browser, print them with WP-CLI:

```bash
wp sleek rank sitemap --format=table
wp sleek rank sitemap --group=12 --format=xml
```
