PHPackages                             divineomega/seo-middleware - 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. divineomega/seo-middleware

Abandoned → [jord-jd/seo-middleware](/?search=jord-jd%2Fseo-middleware)Library[Utility &amp; Helpers](/categories/utility)

divineomega/seo-middleware
==========================

SEO Middleware - middleware to redirect to HTTPS when in production, and remove www. from URLs

v3.0.0(2mo ago)6370LGPL-3.0-onlyPHPPHP &gt;=5.5.9CI failing

Since Sep 1Pushed 2mo agoCompare

[ Source](https://github.com/Jord-JD/SEO-Middleware)[ Packagist](https://packagist.org/packages/divineomega/seo-middleware)[ Docs](https://github.com/Jord-JD/SEO-Middleware)[ GitHub Sponsors](https://github.com/DivineOmega)[ RSS](/packages/divineomega-seo-middleware/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (1)Versions (9)Used By (0)

SEO Middleware
==============

[](#seo-middleware)

This package contains various middleware classes that can be uses with Laravel 5.1 and above to easily add various SEO benefits to your site / web application.

Features
--------

[](#features)

- Redirecting production HTTP requests to HTTPS
- Removal of `www.` from requests and redirecting
- Middleware classes can be applied global or to specific routes

Quick Start
-----------

[](#quick-start)

1. Run `composer require jord-jd/seo-middleware`.
2. In the `$middleware` array in your `app/Http/Kernel.php` file:

- For HTTP to HTTPS redirects, add `\JordJD\SeoMiddleware\Http\Middleware\HttpsOnly::class`.
- For removal of `www.` from requests, add `\JordJD\SeoMiddleware\Http\Middleware\RemoveWww::class`.

3. Remember to set the `APP_ENV` variable to `prod` (in the project's `.env` file) when the application is running in production. Some middleware will only function when this is set to allow for easier local development.

Available Middleware Classes
----------------------------

[](#available-middleware-classes)

Any of these middleware classes can be used globally, by adding them to the `$middleware` array in `apps/Http/Kernel.php` file. They can also be used on a per route basis, by adding them to the `$routeMiddleware` array in the same file and then associated them with a route in your `apps/Http/routes.php`file.

### HttpsOnly Middleware

[](#httpsonly-middleware)

The `HttpsOnly` middleware will redirect any HTTP request to their HTTPS equivalents. The security of websites is becoming an ever increasing ranking signal for search engine rankings.

The HTTP to HTTPS redirect will only take place if the application environment is set to `prod` (production), to aid with local development environments in the setup of HTTPS can be difficult and in many cases unnecessary. Changing this setting can be set in your project's `.env` file, as shown in the example extracts below.

```
APP_ENV=local # Local development (redirect disabled)

```

```
APP_ENV=prod  # Production use (redirect enabled)

```

### RemoveWww Middleware

[](#removewww-middleware)

The `RemoveWww` middleware will check for `www.` within the URL of any requests made to your web application and then redirect them to a version of the URL without the `www.` removed. This can be beneficial for SEO purposes by the potential for similar URLs to be indexed with the same content.

This redirect will occur regardless of the application environment (`APP_ENV`) setting.

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance83

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity63

Established project with proven stability

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

Recently: every ~728 days

Total

8

Last Release

84d ago

Major Versions

v1.1.0 → v2.0.02026-02-14

v2.0.0 → v3.0.02026-02-14

### Community

Maintainers

![](https://www.gravatar.com/avatar/c580cdf7c14898fff179cdfc1085892091d5d2f49d917873a12365af9ac77c93?d=identicon)[Jord-JD](/maintainers/Jord-JD)

---

Top Contributors

[![Jord-JD](https://avatars.githubusercontent.com/u/650645?v=4)](https://github.com/Jord-JD "Jord-JD (9 commits)")

---

Tags

https-redirectlaravel-5-packagelaravel-middlewaremiddlewareseoseo-middlewarehttpsmiddlewaresslwwwredirectseoSEO middleware

### Embed Badge

![Health badge](/badges/divineomega-seo-middleware/health.svg)

```
[![Health](https://phpackages.com/badges/divineomega-seo-middleware/health.svg)](https://phpackages.com/packages/divineomega-seo-middleware)
```

###  Alternatives

[yaroslawww/laravel-force-https

Easy redirect to https for Laravel.

139.7k](/packages/yaroslawww-laravel-force-https)[digitaldream/laravel-seo-tools

Laravel Seo package for Content writer/admin/web master who do not know programming but want to edit/update SEO tags from dashboard

1558.4k](/packages/digitaldream-laravel-seo-tools)[aerni/advanced-seo

Comprehensive SEO addon for Statamic with flexibility in mind

1316.6k](/packages/aerni-advanced-seo)

PHPackages © 2026

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