PHPackages                             ymigval/laravel-wwwprotocolresolver - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. ymigval/laravel-wwwprotocolresolver

ActiveLibrary[HTTP &amp; Networking](/categories/http)

ymigval/laravel-wwwprotocolresolver
===================================

A Laravel package for redirecting responses with or without www and with the specified protocol (http or https).

v1.0.1(1y ago)3265↓100%MITPHPPHP ^8.0

Since Jan 22Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ymigval/laravel-wwwprotocolresolver)[ Packagist](https://packagist.org/packages/ymigval/laravel-wwwprotocolresolver)[ Docs](https://github.com/ymigval/laravel-wwwprotocolresolver)[ RSS](/packages/ymigval-laravel-wwwprotocolresolver/feed)WikiDiscussions main Synced 1mo ago

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

Laravel WWW Protocol Resolver
=============================

[](#laravel-www-protocol-resolver)

The "laravel-wwwprotocolresolver" package provides easy configuration for redirecting responses with or without "www" and with the specified protocol (http or https) in Laravel applications. You can customize the redirection type (permanent or temporary), scheme (http or https), and redirection mode (with or without "www") according to your needs.

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

[](#installation)

To install the package, run the following command in your Laravel project's terminal:

```
composer require ymigval/laravel-wwwprotocolresolver
```

Publish configuration file (optional)
-------------------------------------

[](#publish-configuration-file-optional)

If you want to customize the package configuration, you can publish the configuration file using the following command:

```
php artisan vendor:publish --tag="wwwprotocolresolver"
```

Usage
-----

[](#usage)

To use the package, simply add the following environment variables to your .env file:

```
# Supported: "http", "https"
WWW_PROTOCOL_RESOLVER_USE=https

# Supported: "with_www", "without_www"
WWW_PROTOCOL_RESOLVER_MODE=with_www
```

Ensure that you set these configurations only in production environments to avoid unwanted redirections during development.

### Configuration

[](#configuration)

You can adjust the package configuration in the `config/wwwprotocolresolver.php` file. Here, you can define the redirection type (301 or 302), scheme (http or https), and redirection mode (with or without "www") according to your preferences.

```
return [
    'type' => env('WWW_PROTOCOL_RESOLVER_TYPE', 301),
    'use' => env('WWW_PROTOCOL_RESOLVER_USE'),
    'mode' => env('WWW_PROTOCOL_RESOLVER_MODE'),
];
```

This package allows you to enhance the security and consistency of your URLs by ensuring that all users are redirected to the preferred version of your website.

Changelog
---------

[](#changelog)

Please refer to the [CHANGELOG](CHANGELOG.md) for more information about recent changes.

License
-------

[](#license)

The MIT License (MIT). For more information, please see the [License File](LICENSE).

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance40

Moderate activity, may be stable

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

Total

2

Last Release

499d ago

### Community

Maintainers

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

---

Top Contributors

[![ymigval](https://avatars.githubusercontent.com/u/68402880?v=4)](https://github.com/ymigval "ymigval (9 commits)")

---

Tags

httphttpslaravelprotocolredirectseo-optimizationwwwhttphttpslaravelprotocolwwwredirect

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/ymigval-laravel-wwwprotocolresolver/health.svg)

```
[![Health](https://phpackages.com/badges/ymigval-laravel-wwwprotocolresolver/health.svg)](https://phpackages.com/packages/ymigval-laravel-wwwprotocolresolver)
```

###  Alternatives

[dragon-code/laravel-http-logger

Logging incoming HTTP requests

319.8k3](/packages/dragon-code-laravel-http-logger)[akhan619/laravel-ses-tracking

A Laravel artisan based package to create the AWS (SES + SNS) infrastructure to receive email event notifications with Http/Https endpoint.

149.9k](/packages/akhan619-laravel-ses-tracking)[akhan619/laravel-ses-event-manager

A Laravel package to manage incoming SES email events with http/s webhooks.

148.8k](/packages/akhan619-laravel-ses-event-manager)[sockeon/sockeon

Framework-agnostic PHP WebSocket and HTTP server library with attribute-based routing and support for namespaces and rooms.

291.3k2](/packages/sockeon-sockeon)[laravel-shift/curl-converter

A command line tool to convert curl requests to Laravel HTTP requests.

935.3k](/packages/laravel-shift-curl-converter)[middlewares/https

Middleware to redirect to https and adds the Strict-Transport-Security header

1389.1k3](/packages/middlewares-https)

PHPackages © 2026

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