Turn long links into short, shareable wfiori.co links.
Shorten a link above and watch exactly what happens behind the scenes — from validation and bot protection all the way to storage and the permanent redirect. Every value below comes from your actual request.
The long URL is sent to the server over the shorten-link API together with the solved proof-of-work challenge.
{{ steps.input }}
Only http/https are accepted. Links to internal or private hosts are rejected so the shortener cannot be abused to reach internal systems.
{{ steps.input ? steps.input.split('://')[0] : '' }}
{{ step_validation_status }}
Your browser already solved a puzzle: find a number whose SHA-256 hash starts with several zeros. The server verifies the signed challenge and the solution before doing any work.
{{ pow_debug.nonce }}
{{ pow_debug.difficulty }}
{{ pow_debug.solution }}
{{ pow_debug.hashPreview }}
A 6-character code is drawn from a 62-character alphabet using a cryptographically secure random generator, giving an enormous, unguessable keyspace.
{{ steps.alphabetSize }}
{{ steps.codeLength }}
{{ keyspace_text }}
{{ steps.code }}
The scheme and host are lower-cased, then the result is hashed with SHA-256. This hash is stored in a UNIQUE column so the same destination always maps to one code.
{{ steps.normalized }}
{{ steps.hash }}
The code, destination, hash, creation time, and creator IP (for abuse tracing only) are inserted into the short_url table. If the hash already exists, the existing code is returned instead.
{{ dedup_text }}
When https://wfiori.co/<code> is visited, the resolver looks the code up by its primary key — an O(1) index lookup.
{{ steps.code }}
{{ steps.shortUrl }}
The server responds with an HTTP 301 permanent redirect to the original URL, and the click counter is incremented.
{{ redirect_text }}
Every short link is a single row in this MySQL table. The short code is the primary key, and url_hash carries a UNIQUE index that powers both de-duplication and fast lookups.
| Column | Type | Purpose |
|---|---|---|
id
|
VARCHAR(6) PK
|
The short code itself and the primary key. Lookups by code are O(1). |
created_at
|
TIMESTAMP
|
When the link was created. |
redirect_to
|
VARCHAR(2048)
|
The original (long) destination URL. |
url_hash
|
VARCHAR(64) UNIQUE
|
SHA-256 of the normalized URL. UNIQUE — enforces de-duplication at the database level. |
number_of_clicks
|
INT
|
How many times the short link has been visited. |
ip_address
|
VARCHAR(45) NULL
|
Creator IP, stored for abuse detection only. Never exposed to users. |
Because a public shortener is a magnet for spam and phishing, several self-hosted defenses run on every request — no external services, no CAPTCHA.