PHPackages                             michaldudek/subdomain-blacklist - 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. michaldudek/subdomain-blacklist

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

michaldudek/subdomain-blacklist
===============================

Common words that your users shouldn't use when setting up accounts.

0.9.1(10y ago)2816.0k↓44.7%5MITPHP

Since Nov 5Pushed 10y ago4 watchersCompare

[ Source](https://github.com/michaldudek/subdomain-blacklist)[ Packagist](https://packagist.org/packages/michaldudek/subdomain-blacklist)[ RSS](/packages/michaldudek-subdomain-blacklist/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

Subdomain Blacklist
===================

[](#subdomain-blacklist)

List of common words that your users shouldn't use when setting up accounts.

[![Build Status](https://camo.githubusercontent.com/b74db33d724812f7eaca722d828925f5355c1779ed4f465e716ba242ba783707/68747470733a2f2f7472617669732d63692e6f72672f6d696368616c647564656b2f737562646f6d61696e2d626c61636b6c6973742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/michaldudek/subdomain-blacklist)[![SensioLabsInsight](https://camo.githubusercontent.com/023c88462ab78593256f862c509d61bcce4491e710291dd9c999b7ff896df47a/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f35356162326439372d656262632d343661392d383434622d3837376162393931656166612f6d696e692e706e67)](https://insight.sensiolabs.com/projects/55ab2d97-ebbc-46a9-844b-877ab991eafa)[![HHVM Status](https://camo.githubusercontent.com/eba17797066117b9100bf06836719aa3b2ded8a13da12e3bd86429f163f9617e/687474703a2f2f6868766d2e683463632e64652f62616467652f6d696368616c647564656b2f737562646f6d61696e2d626c61636b6c6973742e706e67)](http://hhvm.h4cc.de/package/michaldudek/subdomain-blacklist)

When your app or service allows users to access their accounts using subdomains, e.g. `michaldudek.myapp.com`, it is useful to block some words so they don't take away a subdomain you'd want to use in the future or worse, try to trick your other users into believing they represent you (e.g. `legal.myapp.com` or `support.myapp.com`).

Apart from the blacklist, the goal of this repository is to provide code in various languages that validates a username against the list.

Note that the goal of this library IS NOT to validate domain name. You still have to check whether or not the given username makes a valid subdomain.

#### Acknowledgement

[](#acknowledgement)

The idea and the list was originally taken from [Sandeep Shetty](https://github.com/sandeepshetty/subdomain-blacklist).

Spec
====

[](#spec)

Implementation MUST have a method/function called `validate` which takes a single string argument.

The `validate` method/function MUST return a boolean value.

Before a string is validates it MUST be normalized. Normalization of the string MUST:

- remove any suffixed digits,
- change case to lowercase,
- remove a single `s` character if the string ends with an `s`.

#### addToList

[](#addtolist)

Implementation CAN contain `addToList` (or `add_to_list` if more appropriate for the language) method/function that will add other items to the blacklist.

`addToList` method/function MUST accept single string argument.

`addToList` method/function CAN accept an array of strings as a single argument.

Before a string item is added to the blacklist via `addToList` method/function the default blacklist MUST be loaded.

Before a string item is added to the blacklist it MUST be normalized with the rules above.

#### getList

[](#getlist)

Implementation CAN contain `getList` (or `get_list` if more appropriate for the language) method/function that will return the blacklist.

Using and Languages
===================

[](#using-and-languages)

For more information about how to use this list in your specific language, please refer to `README.md` file in the language's folder.

Currently supported:

- php - [more info](php/README.md) - `$ composer require michaldudek/subdomain-blacklist dev-master`

Planned:

- JavaScript (node.js)
- JavaScript (browser)
- Go
- Ruby
- Python

You are welcome to add support for other languages.

Contributing
============

[](#contributing)

At this moment pull requests with support for various languages are most welcome.

If you add a language support make sure to cover it with appropriate tests.

Also if you think some words should be added to the list either open an issue or do a PR.

If you are editing a code please make sure to adhere to common patterns and rules in that language.

See more in each languages specific `README.md` file in their appropriate directory.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% 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 ~214 days

Total

2

Last Release

3998d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/802141?v=4)[Michał Pałys-Dudek](/maintainers/michaldudek)[@michaldudek](https://github.com/michaldudek)

---

Top Contributors

[![michaldudek](https://avatars.githubusercontent.com/u/802141?v=4)](https://github.com/michaldudek "michaldudek (10 commits)")[![nickleus](https://avatars.githubusercontent.com/u/83606?v=4)](https://github.com/nickleus "nickleus (2 commits)")

---

Tags

userdomainaccountusername

### Embed Badge

![Health badge](/badges/michaldudek-subdomain-blacklist/health.svg)

```
[![Health](https://phpackages.com/badges/michaldudek-subdomain-blacklist/health.svg)](https://phpackages.com/packages/michaldudek-subdomain-blacklist)
```

###  Alternatives

[zachleigh/laravel-property-bag

Easy Laravel user settings using a property bag

85340.3k](/packages/zachleigh-laravel-property-bag)[helgesverre/domain-availability

A PHP library for checking if a domain name is registered or not

26618.4k1](/packages/helgesverre-domain-availability)[aura/payload

A Domain Payload implementation.

56370.4k9](/packages/aura-payload)[aura/payload-interface

An interface package for Domain Payload implementations.

13392.7k4](/packages/aura-payload-interface)[bornfreee/tactician-domain-events-bundle

Bundle to integrate Tactician Domain Events library with Symfony project

10138.6k](/packages/bornfreee-tactician-domain-events-bundle)[bnomei/kirby3-recently-modified

Kirby Section to display recently modified content pages

309.3k](/packages/bnomei-kirby3-recently-modified)

PHPackages © 2026

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