PHPackages                             loveduckie/silverstripe-canonical - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. loveduckie/silverstripe-canonical

ActiveSilverstripe-vendormodule[Utility &amp; Helpers](/categories/utility)

loveduckie/silverstripe-canonical
=================================

Adds a simple canonical tag in Silverstripe

v1.1(5y ago)1120BSD-3-ClausePHP

Since Mar 20Pushed 1y agoCompare

[ Source](https://github.com/LoveDuckie/silverstripe-canonical)[ Packagist](https://packagist.org/packages/loveduckie/silverstripe-canonical)[ Docs](https://github.com/DorsetDigital/silverstripe-canonical)[ RSS](/packages/loveduckie-silverstripe-canonical/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependencies (2)Versions (7)Used By (0)

silverstripe-canonical
======================

[](#silverstripe-canonical)

Adds a `rel=canonical` tag to Silverstripe 4 to prevent search engines from recording duplicate entries for the same page.

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/e0fecf474837c145762412e8d68ba0aaca94eb059c2582d166572424d15949ac/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6c6f76656475636b69652f73696c7665727374726970652d63616e6f6e6963616c2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/loveduckie/silverstripe-canonical/?branch=master)[![Build Status](https://camo.githubusercontent.com/0ce6128a819535e64ebb4e00100689b2f8ed6ee3da8ea9081fd937dda5959b7c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6c6f76656475636b69652f73696c7665727374726970652d63616e6f6e6963616c2f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/loveduckie/silverstripe-canonical/build-status/master)[![License](https://camo.githubusercontent.com/b3775a2de17853a90995faa104f941eef3ad3c40cc89e34b8b1eaea014614d4e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d425344253230332d2d436c617573652d626c75652e737667)](LICENSE.md)[![Version](https://camo.githubusercontent.com/d12bb813a22cc32996c27e53e181c3dc60853cc8876a86f7832ec56849743738/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c6f76656475636b69652f73696c7665727374726970652d63616e6f6e6963616c2e7376673f7374796c653d666c6174)](https://packagist.org/packages/loveduckie/silverstripe-canonical)

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

[](#requirements)

SilverStripe 4

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

[](#installation)

- Install the code with `composer require loveduckie/silverstripe-canonical`
- Run a `dev/build?flush` to update your project

Usage
-----

[](#usage)

This module adds a simple canonical tag to your pages to allow for the specification of the default domain.
The canonical tag allows you to signal to search engines like Google which is the authoritative version of the page to help reduce duplicate content issues caused by non-www versions, pages with different protocols, etc.

Once installed, go to the site settings and enter the full canonical domain. This should include the protocol (eg. http:// or https://)

The module tries to be the last extension to be applied, and will try to remove any existing `rel="canonical"` tags from the head.

At the time of writing, the canonical tags are only added correctly for pages in the SiteTree. Pages generated from custom controllers or from DataObjects may or may not work! When creating the canonical tags, the module will look for a method called `CanonicalLink()` on the extended object. If you are using DataObjects as pages, adding this method on the relevant controller should allow you to control the canonical URL in these cases.

**Support has since been added for automatically integrating canonical tags for pages that are rendered as DataObjects with controllers. Refer to documentation about how to use this.**

Additional Credits
------------------

[](#additional-credits)

- Thanks to @sanderha () for the Danish translation
- Thanks to @lerni () for his enhancements

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance30

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~198 days

Recently: every ~248 days

Total

6

Last Release

1982d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c8f1677a6a13ddf590769d7fbef94f183823c3b07e676bf3852bea611bd2947d?d=identicon)[LoveDuckie](/maintainers/LoveDuckie)

---

Top Contributors

[![DorsetDigital](https://avatars.githubusercontent.com/u/15108750?v=4)](https://github.com/DorsetDigital "DorsetDigital (18 commits)")[![LoveDuckie](https://avatars.githubusercontent.com/u/692378?v=4)](https://github.com/LoveDuckie "LoveDuckie (16 commits)")[![lerni](https://avatars.githubusercontent.com/u/472115?v=4)](https://github.com/lerni "lerni (10 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (2 commits)")[![sanderha](https://avatars.githubusercontent.com/u/6941043?v=4)](https://github.com/sanderha "sanderha (1 commits)")

---

Tags

canonicalcanonical-urlcanonical-urlsseosilverstripesilverstripe-4silverstripe-modulehtmlsilverstripeseocanonical

### Embed Badge

![Health badge](/badges/loveduckie-silverstripe-canonical/health.svg)

```
[![Health](https://phpackages.com/badges/loveduckie-silverstripe-canonical/health.svg)](https://phpackages.com/packages/loveduckie-silverstripe-canonical)
```

###  Alternatives

[cyber-duck/silverstripe-seo

A SilverStripe module to optimise the Meta, crawling, indexing, and sharing of your website content

4351.1k](/packages/cyber-duck-silverstripe-seo)[dorsetdigital/silverstripe-enhanced-requirements

Enhanced requirements for Silverstripe

117.8k4](/packages/dorsetdigital-silverstripe-enhanced-requirements)

PHPackages © 2026

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