PHPackages                             innoweb/silverstripe-robots - 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. innoweb/silverstripe-robots

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

innoweb/silverstripe-robots
===========================

Adds a Robots.txt file that is configurable from /admin/settings/.

6.1.2(4mo ago)017.4k↑24.3%31BSD-3-ClausePHP

Since Sep 21Pushed 4mo ago2 watchersCompare

[ Source](https://github.com/xini/silverstripe-robots)[ Packagist](https://packagist.org/packages/innoweb/silverstripe-robots)[ Docs](https://github.com/xini/silverstripe-robots)[ RSS](/packages/innoweb-silverstripe-robots/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (2)Versions (30)Used By (1)

Silverstripe Robots.txt
=======================

[](#silverstripe-robotstxt)

[![Version](https://camo.githubusercontent.com/be66cbf9cd366ed380a7267b87b19e1b6f639ede6d0f2ca37360423b2e5d238e/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696e6e6f7765622f73696c7665727374726970652d726f626f74732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/innoweb/silverstripe-robots)[![License](https://camo.githubusercontent.com/54deef5047666af3384f69d72471ea742b552d5690d0964344bbdd81a46d9c41/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f696e6e6f7765622f73696c7665727374726970652d726f626f74732e7376673f7374796c653d666c61742d737175617265)](license.md)

Overview
--------

[](#overview)

Adds a Robots.txt file that is configurable from /admin/settings/ and injects robots meta tag into all pages.

This module supports single site as well as [multisites](https://github.com/symbiote/silverstripe-multisites) and [configured-multisites](https://github.com/fromholdio/silverstripe-configured-multisites) setups.

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

[](#requirements)

- Silverstripe CMS 6.x

Note: this version is compatible with Silverstripe 6.

For Silverstripe 5, please see the [5 release line](https://github.com/xini/silverstripe-robots/tree/4).

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

[](#installation)

Install the module using composer:

```
composer require innoweb/silverstripe-robots dev-master

```

Then run dev/build.

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

[](#configuration)

### Robots.txt

[](#robotstxt)

On the SiteConfig (or Site if Multisites is installed) there is a setting in the CMS that lets you set the robots mode. The three options are:

- Allow all
- Disallow all
- Custom content

The output of all three states is managed through templates and can be overwritten for an app or theme.

You can force the state using the following `.env` variable (e.g. for dev or test environment):

```
FORCE_ROBOTS_MODE="allow|disallow|custom"
```

#### Allow all

[](#allow-all)

When switched to 'allow all' the module uses the template `Innoweb/Robots/RobotsController_allow.ss` with the following default content:

```
Sitemap: {$GoogleSitemapURL}
User-agent: *
Disallow: /dev/
Disallow: /admin/
Disallow: /Security/

```

The module checks whether the [Google Sitemaps module](https://github.com/wilr/silverstripe-googlesitemaps) is installed and injects the sitemap URL automatically.

It allows access to all pages and disallows access to development and security URLs by default.

#### Disallow all

[](#disallow-all)

When switched to 'disallow all' the module uses the template `Innoweb/Robots/RobotsController_disallow.ss` with the following default content:

```
User-agent: *
Disallow: /

```

This disallows all robots from accessing any page on the site.

#### Custom content

[](#custom-content)

This setting reveals a text field in the CMS where custom code can be entered.

The template contains the following code and doesn't add anything to the custom code entered:

```
$RobotsContent.RAW

```

A good standard robots.txt configuration for Silverstripe looks as follows. This is used as default when the module is switched to 'allow all':

```
Sitemap: https://www.example.com/sitemap.xml
User-agent: *
Disallow: /dev/
Disallow: /admin/
Disallow: /Security/

```

### Robots meta tag

[](#robots-meta-tag)

The module injects a robots meta tag into every page. The injection of the meta tag can be disabled using the following config, e.g. if the robots meta tag is managed manually in the template:

```
Page:
  robots_enable_metatag: false
```

By default, all pages are set to `index, follow` with the following exceptions:

- The Robots.txt setting on the site if set to 'Disallow all'
- The environment is set to `test` or `dev`
- The current page is displayed by the Security controller
- The Priority setting for the page is `-1` (see [Google Sitemaps module](https://github.com/wilr/silverstripe-googlesitemaps))

Additionally, for each page type a config value can be set to control the meta tag. By default, the following values are set:

```
Page:
  robots_noindex: false
  robots_nofollow: false

SilverStripe\CMS\Model\VirtualPage:
  robots_noindex: true
  robots_nofollow: true

SilverStripe\ErrorPage\ErrorPage:
  robots_noindex: true
  robots_nofollow: true
```

This can be customised for any custom page types as needed.

License
-------

[](#license)

BSD 3-Clause License, see [License](license.md)

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance76

Regular maintenance activity

Popularity28

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 79.5% 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 ~97 days

Recently: every ~85 days

Total

29

Last Release

131d ago

Major Versions

1.1.0 → 2.0.02020-07-20

2.1.0 → 3.0.02020-12-07

3.1.1 → 4.0.02022-05-11

4.x-dev → 5.0.02023-03-16

5.x-dev → 6.0.02025-09-18

### Community

Maintainers

![](https://www.gravatar.com/avatar/0d2e71d7787401a7bd4916062346163897f89f455d650ab32b5d60cd14825ad3?d=identicon)[xini](/maintainers/xini)

---

Top Contributors

[![xini](https://avatars.githubusercontent.com/u/1152403?v=4)](https://github.com/xini "xini (35 commits)")[![dizzystuff](https://avatars.githubusercontent.com/u/576903?v=4)](https://github.com/dizzystuff "dizzystuff (9 commits)")

---

Tags

silverstripeseorobotsrobots.txt

### Embed Badge

![Health badge](/badges/innoweb-silverstripe-robots/health.svg)

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

###  Alternatives

[silverstripe/userforms

UserForms enables CMS users to create dynamic forms via a drag and drop interface and without getting involved in any PHP code

1371.1M85](/packages/silverstripe-userforms)[symbiote/silverstripe-advancedworkflow

Adds configurable workflow support to the CMS, with a GUI for creating custom workflow definitions.

46302.4k9](/packages/symbiote-silverstripe-advancedworkflow)[cyber-duck/silverstripe-seo

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

4351.3k](/packages/cyber-duck-silverstripe-seo)[axllent/silverstripe-cms-tweaks

Several CMS usability improvements

1726.4k1](/packages/axllent-silverstripe-cms-tweaks)

PHPackages © 2026

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