PHPackages                             julabo/yourls\_require\_protocol - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. julabo/yourls\_require\_protocol

ActiveYourls-plugin[Validation &amp; Sanitization](/categories/validation)

julabo/yourls\_require\_protocol
================================

Advanced protocol validation for original URLs in YOURLS.

1.0.1(5mo ago)05MITPHPPHP &gt;=7.4.0

Since Dec 11Pushed 5mo agoCompare

[ Source](https://github.com/julabo/yourls_require_protocol)[ Packagist](https://packagist.org/packages/julabo/yourls_require_protocol)[ RSS](/packages/julabo-yourls-require-protocol/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Require Protocol Plugin for YOURLs
==================================

[](#require-protocol-plugin-for-yourls)

Require Protocol is a YOURLS plugin that ensures original URLs have a valid protocol — and can optionally enforce HTTPS.

#### Features

[](#features)

- Enforces presence of a protocol (`http://` or `https://`)
- Optional: Automatically add `http://` when no protocol is present
- Optional: Automatically add `https://` when no protocol is present
- Optional: Allow only HTTPS
- Optional: Automatically upgrade `http://` → `https://`
- Consistent error messages in the YOURLS admin
- Fully compatible with YOURLS 1.9+

---

### Installation

[](#installation)

1. Download or clone the repository
2. Copy the folder to `user/plugins/yourls-require-protocol/`
3. In YOURLS Admin: **Activate the plugin**

---

### Configuration

[](#configuration)

All settings can be found at the top of `plugin.php`.

#### Allow only HTTPS

[](#allow-only-https)

```
define('REQP_REQUIRE_HTTPS', true);
```

#### Automatically upgrade http:// to https://

[](#automatically-upgrade-http-to-https)

```
define('REQP_UPGRADE_TO_HTTPS', true);
```

#### When no protocol is present: automatically add http://

[](#when-no-protocol-is-present-automatically-add-http)

```
define('REQP_AUTO_ADD_HTTP', true);
```

#### When no protocol is present: automatically add https://

[](#when-no-protocol-is-present-automatically-add-https)

```
define('REQP_AUTO_ADD_HTTPS', true);
```

Note: If both `REQP_AUTO_ADD_HTTPS` and `REQP_AUTO_ADD_HTTP` are set to `true`, `https://` takes precedence.

### Examples

[](#examples)

InputSettingResultexample.comREQP\_AUTO\_ADD\_HTTPS = trueexample.comREQP\_AUTO\_ADD\_HTTP = trueexample.comREQP\_AUTO\_ADD\_HTTPS = true, REQP\_AUTO\_ADD\_HTTP = trueREQP\_UPGRADE\_TO\_HTTPS = trueREQP\_REQUIRE\_HTTPS = trueErrorexample.comno auto-fix optionError### License

[](#license)

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for full license text.

### Support

[](#support)

For issues, feature requests, or contributions, please visit the [GitHub repository](https://github.com/julabo/yourls_require_protocol).

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance73

Regular maintenance activity

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

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

Total

2

Last Release

154d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b7bfd4fc23a59188b07329a730d0ca969a2720493db2845e11e7d24a5f24e1f?d=identicon)[jleehr](/maintainers/jleehr)

---

Top Contributors

[![jleehr](https://avatars.githubusercontent.com/u/1804614?v=4)](https://github.com/jleehr "jleehr (3 commits)")

### Embed Badge

![Health badge](/badges/julabo-yourls-require-protocol/health.svg)

```
[![Health](https://phpackages.com/badges/julabo-yourls-require-protocol/health.svg)](https://phpackages.com/packages/julabo-yourls-require-protocol)
```

###  Alternatives

[webmozart/assert

Assertions to validate method input/output with nice error messages.

7.6k894.0M1.2k](/packages/webmozart-assert)[bensampo/laravel-enum

Simple, extensible and powerful enumeration implementation for Laravel.

2.0k15.9M104](/packages/bensampo-laravel-enum)[swaggest/json-schema

High definition PHP structures with JSON-schema based validation

48612.5M73](/packages/swaggest-json-schema)[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[ashallendesign/laravel-config-validator

A package for validating your Laravel app's config.

217905.3k5](/packages/ashallendesign-laravel-config-validator)[crazybooot/base64-validation

Laravel validators for base64 encoded files

1341.9M8](/packages/crazybooot-base64-validation)

PHPackages © 2026

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