PHPackages                             jorisnoo/craft-sitemap - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. jorisnoo/craft-sitemap

ActiveCraft-module[Parsing &amp; Serialization](/categories/parsing)

jorisnoo/craft-sitemap
======================

Zero-config XML sitemap for Craft CMS with multi-site hreflang support.

1.0.2(1mo ago)0367↓55.3%MITPHPPHP ^8.2CI passing

Since May 12Pushed 1mo agoCompare

[ Source](https://github.com/jorisnoo/craft-sitemap)[ Packagist](https://packagist.org/packages/jorisnoo/craft-sitemap)[ RSS](/packages/jorisnoo-craft-sitemap/feed)WikiDiscussions main Synced 4w ago

READMEChangelog (3)Dependencies (2)Versions (5)Used By (0)

Craft Sitemap
=============

[](#craft-sitemap)

A [Craft CMS](https://craftcms.com/) module that generates a zero-config XML sitemap with multi-site hreflang support.

Features
--------

[](#features)

- Generates a `sitemap.xml` with all entries and categories that have URIs
- Adds `xhtml:link` hreflang alternates for multi-site setups
- Deduplicates URLs across canonical groups and sites
- Works with zero config; optional config file to exclude sections, category groups, or URI patterns

Requirements
------------

[](#requirements)

- PHP 8.2+
- Craft CMS 5

Installation
------------

[](#installation)

```
composer require jorisnoo/craft-sitemap
```

Then register the module in your `config/app.php`:

```
return [
    'modules' => [
        'craft-sitemap' => \Noo\CraftSitemap\Module::class,
    ],
    'bootstrap' => ['craft-sitemap'],
];
```

The sitemap will be available at `sitemap.xml` on your site.

Configuration
-------------

[](#configuration)

Configuration is optional. To exclude content from the sitemap, create `config/craft-sitemap.php`:

```
return [
    // Skip all entries in these section handles
    'excludeSections' => ['private', 'drafts'],

    // Skip all categories in these group handles
    'excludeCategoryGroups' => ['internal'],

    // Skip URIs matching any of these glob patterns (matched against the element URI)
    'excludeUriPatterns' => ['legal/*', 'private'],
];
```

URI patterns use `fnmatch()` syntax: `*` matches any sequence of characters within a path segment, `?` matches a single character.

How It Works
------------

[](#how-it-works)

The module registers a `sitemap.xml` route on your site. When requested, it:

1. Queries all entries and categories with URIs across all sites
2. Groups elements by their canonical ID to identify translations
3. Deduplicates by site handle and URL
4. Renders an XML sitemap with ``, ``, and (on multi-site) `` tags

Single-site installs get a standard sitemap. Multi-site installs automatically include hreflang alternate links for each translation.

Results are cached and automatically invalidated when entries or categories are saved or deleted.

License
-------

[](#license)

The MIT License (MIT). Please see [LICENSE](LICENSE) for more information.

###  Health Score

43

—

FairBetter than 90% of packages

Maintenance91

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~3 days

Total

3

Last Release

43d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0440b6ac994d5566a2ef5886fbac104a73f8458e70dbd20085e241ab0f647e0d?d=identicon)[jorgenoo](/maintainers/jorgenoo)

---

Top Contributors

[![jorisnoo](https://avatars.githubusercontent.com/u/5810772?v=4)](https://github.com/jorisnoo "jorisnoo (15 commits)")

---

Tags

xmlcmsCraftcraftcmsSitemapseohreflang

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/jorisnoo-craft-sitemap/health.svg)

```
[![Health](https://phpackages.com/badges/jorisnoo-craft-sitemap/health.svg)](https://phpackages.com/packages/jorisnoo-craft-sitemap)
```

###  Alternatives

[nystudio107/craft-seomatic

SEOmatic facilitates modern SEO best practices &amp; implementation for Craft CMS 5. It is a turnkey SEO system that is comprehensive, powerful, and flexible.

1741.5M52](/packages/nystudio107-craft-seomatic)[verbb/formie

The most user-friendly forms plugin for Craft.

100387.6k59](/packages/verbb-formie)[verbb/vizy

A flexible visual editor field for Craft.

4249.7k](/packages/verbb-vizy)[verbb/hyper

A user-friendly links field for Craft.

24142.6k12](/packages/verbb-hyper)[verbb/social-poster

Automatically post entries to social media.

918.5k](/packages/verbb-social-poster)[verbb/icon-picker

A slick field to pick icons from. Supports SVGs, Sprites, Webfonts, Font Awesome and more.

16168.8k6](/packages/verbb-icon-picker)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
