PHPackages                             emran-alhaddad/noindex-redirect - 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. emran-alhaddad/noindex-redirect

ActiveStatamic-addon[Utility &amp; Helpers](/categories/utility)

emran-alhaddad/noindex-redirect
===============================

Disable indexing (noindex/nofollow) and optionally redirect frontend requests, with a Statamic CP Utility.

1.1.2(3w ago)018MITPHPPHP ^8.1

Since Feb 12Pushed 3w agoCompare

[ Source](https://github.com/emran-alhaddad/statamic-noindex-redirect)[ Packagist](https://packagist.org/packages/emran-alhaddad/noindex-redirect)[ RSS](/packages/emran-alhaddad-noindex-redirect/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (2)Versions (13)Used By (0)

 [![Noindex Redirect](assets/thumbnail.png)](assets/thumbnail.png)

 [ ![Statamic Marketplace](https://camo.githubusercontent.com/e365b0c046790a0d9b5ce932742e760af6dc2ecb8808674b0ff993b2e79d6d83/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53746174616d69632d4d61726b6574706c6163652d3445354446463f6c6f676f3d73746174616d6963266c6f676f436f6c6f723d7768697465) ](https://statamic.com/addons/emran-alhaddad/statamic-noindex-redirect) [ ![Latest Version on Packagist](https://camo.githubusercontent.com/0c824683d2fea867c7a089322d87593f9fc67cc254b54c1606e7abb96a3ee561/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656d72616e2d616c6861646461642f6e6f696e6465782d7265646972656374) ](https://packagist.org/packages/emran-alhaddad/noindex-redirect) [ ![Total Downloads](https://camo.githubusercontent.com/7d750c7b18d6b68f42fd8f6c2004fc94a6d480343769337443f066a59b547125/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656d72616e2d616c6861646461642f6e6f696e6465782d7265646972656374) ](https://packagist.org/packages/emran-alhaddad/noindex-redirect) [ ![Monthly Downloads](https://camo.githubusercontent.com/83426abcdbfa2586c6b9163c62c530852db883e6f25d4d54441a156e54dd4b9a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f656d72616e2d616c6861646461642f6e6f696e6465782d7265646972656374) ](https://packagist.org/packages/emran-alhaddad/noindex-redirect) [ ![License](https://camo.githubusercontent.com/ad303da9d486b1b71078ef24734410540f7345bbf6b9d0ef16c2acaff57d5949/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f656d72616e2d616c6861646461642f6e6f696e6465782d7265646972656374) ](https://packagist.org/packages/emran-alhaddad/noindex-redirect)

Noindex Redirect (Statamic Addon)
=================================

[](#noindex-redirect-statamic-addon)

Disable indexing (`noindex, nofollow`) for your Statamic site and optionally redirect all frontend requests to another domain — managed from a **Control Panel Utility**.

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

[](#requirements)

- PHP `^8.1`
- Statamic `^4.0`, `^5.0`, or `^6.0`

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

[](#installation)

```
composer require emran-alhaddad/noindex-redirect
```

Control Panel Utility
---------------------

[](#control-panel-utility)

Go to **Control Panel → Utilities → Noindex Redirect**.

Settings are stored in `storage/app/noindex-redirect/settings.json` and will override config/env values until you click **Reset to config**.

Configuration (optional)
------------------------

[](#configuration-optional)

Publish the config file:

```
php artisan vendor:publish --tag=noindex-redirect-config
```

Config path:

- `config/noindex-redirect.php`

Environment variables:

```
NOINDEX_REDIRECT_DISABLE_INDEXING=true
NOINDEX_REDIRECT_ENABLE_REDIRECT=false
NOINDEX_REDIRECT_REDIRECT_URL=https://example.com
NOINDEX_REDIRECT_MANAGE_PUBLIC_ROBOTS_TXT=true
```

What it does
------------

[](#what-it-does)

### Disable Indexing

[](#disable-indexing)

When enabled, the addon:

- Adds `X-Robots-Tag: noindex, nofollow` to frontend responses (excludes CP + GraphQL routes).
- Injects `` into the HTML `` for `text/html` responses.
- Covers normal frontend pages and frontend 404/unmatched responses.
- Optionally manages `public/robots.txt` (see below).
- Still works even if Statamic frontend routes are disabled in `config/statamic/routes.php`.

### robots.txt behavior

[](#robotstxt-behavior)

Some servers (including local dev setups) will serve `public/robots.txt` directly and bypass Laravel routes.

If `NOINDEX_REDIRECT_MANAGE_PUBLIC_ROBOTS_TXT=true`, the addon will:

- Write a managed `public/robots.txt` when indexing is disabled (`Disallow: /`).
- Back up any existing `public/robots.txt` to `storage/app/noindex-redirect/robots.backup.txt` before overriding it.
- Restore the backup when indexing is re-enabled.

If the `public` directory is not writable, robots.txt syncing is skipped.

### Redirect

[](#redirect)

When **Enable Redirect** is enabled and a `redirect_url` is set, all frontend `GET`/`HEAD` requests will be redirected (301) to the configured URL (path + query preserved).

Control Panel, `!/` actions (including `!/forms`), and GraphQL routes are excluded.

License
-------

[](#license)

MIT. See `LICENSE`.

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance94

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

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

Recently: every ~28 days

Total

12

Last Release

25d ago

PHP version history (2 changes)v1.0PHP ^8.2

1.1.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/7cad96f9e9c3c7a4600d1f5c458f3fbce165cbbcfa4600335fae50f5acf59b05?d=identicon)[emran-alhaddad](/maintainers/emran-alhaddad)

---

Top Contributors

[![emran-alhaddad](https://avatars.githubusercontent.com/u/65433346?v=4)](https://github.com/emran-alhaddad "emran-alhaddad (12 commits)")

---

Tags

laravelredirectseorobotsstatamicnoindexnofollow

### Embed Badge

![Health badge](/badges/emran-alhaddad-noindex-redirect/health.svg)

```
[![Health](https://phpackages.com/badges/emran-alhaddad-noindex-redirect/health.svg)](https://phpackages.com/packages/emran-alhaddad-noindex-redirect)
```

###  Alternatives

[statamic/seo-pro

68516.6k](/packages/statamic-seo-pro)[marcorieser/statamic-livewire

A Laravel Livewire integration for Statamic.

23111.5k14](/packages/marcorieser-statamic-livewire)[withcandour/aardvark-seo

Save time and get your Statamic site to rank better with the SEO addon for Statamic.

15133.0k](/packages/withcandour-aardvark-seo)[aerni/advanced-seo

Comprehensive SEO addon for Statamic with flexibility in mind

1818.2k](/packages/aerni-advanced-seo)[calotype/seo

A package containing SEO helpers.

742.6k](/packages/calotype-seo)[justkidding96/aardvark-seo

Save time and get your Statamic site to rank better with the SEO addon for Statamic.

155.4k](/packages/justkidding96-aardvark-seo)

PHPackages © 2026

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