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.1.2(2w ago)013MITPHPPHP &gt;=8.0

Since Dec 11Pushed 2w 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 today

READMEChangelog (6)Dependencies (1)Versions (7)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
- Requires YOURLS 1.10.4+

---

### 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

34

—

LowBetter than 75% of packages

Maintenance83

Actively maintained with recent releases

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

Recently: every ~45 days

Total

6

Last Release

18d ago

PHP version history (2 changes)1.0.0PHP &gt;=7.4.0

1.1.0PHP &gt;=8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1804614?v=4)[Jan Leehr](/maintainers/jleehr)[@jleehr](https://github.com/jleehr)

---

Top Contributors

[![jleehr](https://avatars.githubusercontent.com/u/1804614?v=4)](https://github.com/jleehr "jleehr (7 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

[marcosh/php-validation-dsl

A DSL for validating data in a functional fashion

483.9k](/packages/marcosh-php-validation-dsl)

PHPackages © 2026

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