Creating Shortlinks
A shortlink (or "lnkify") is a compact, shareable URL that redirects visitors to a longer destination URL. Instead of sharing https://example.com/articles/2024/how-to-build-a-url-shortener-with-react-and-graphql, you share lnkify.io/build-shortener. This page covers everything about creating shortlinks through the web interface.
What Is a Shortlink?
A shortlink has two parts:
- Domain — the base URL of your lnkify instance (e.g.
lnkify.io) - Slug — the unique short identifier after the
/(e.g.abc123)
When someone visits lnkify.io/abc123, lnkify looks up the slug, records the click (if tracking is enabled), and redirects the visitor to the destination URL you configured.
The Create Form
You can create a shortlink from two places:
- The Create button at the top of the Dashboard
- The + New Link button (location may vary by theme)
Both open the same creation form with the following fields:
Target URL (Required)
The destination URL that visitors will be redirected to. This is the long URL you want to shorten.
- Must be a valid, fully-formed URL (e.g.
https://example.com/page) - Must use the
https://orhttp://scheme — other schemes (mailto:,javascript:,data:,file:, …) and relative paths are rejected - Maximum length is 2048 characters
Pro tip
The http(s)-only rule keeps shortlinks safe to share — a shortlink can never redirect to a javascript: payload or other non-web scheme.
Custom Slug (Optional)
The slug is the short identifier that appears after your domain. For example, in lnkify.io/my-promo, the slug is my-promo.
If you leave this blank, lnkify automatically generates a random 6–8 character slug for you.
Slug rules:
- Contains only letters (
a–z,A–Z), numbers (0–9), hyphens (-), and underscores (_) - No spaces or other special characters
- Case-sensitive and stored exactly as entered (auto-generated slugs are always lowercase)
- Maximum length is 100 characters
- Cannot be a reserved path used by the app — e.g.
graphql,manage,mcp,healthz,readyz,llms.txt,robots.txt,assets,api,admin,login,signup - Must be unique — if the slug is already taken, you'll see an error and must choose another
Duplicate slug handling: If you enter a slug that's already in use, the form will show an error message: "This slug is already taken." Choose a different slug or leave it blank for an auto-generated one.
Title (Optional)
A descriptive label for your own reference. This:
- Appears in your dashboard links table
- Helps you identify links when you have many
- Is not visible to anyone who clicks the shortlink
- Can be changed later via the edit function
Tracking Toggle
Click tracking is enabled by default. When on:
- Every click on the shortlink is recorded
- You can view analytics including click count, geographic location, browser, and OS data
- No data is shown to visitors — analytics are private to your account
Toggle tracking off if:
- You don't need analytics for this particular link
- You want to minimize data collection
- The link is for internal/private use
INFO
Tracking can be toggled on or off at any time by editing the link later. See Managing Shortlinks.
Custom Domain (Optional)
If you've added and verified a custom domain, you can pick it from the domain selector so the link resolves at https://<your-domain>/<slug> instead of the instance default. See Custom Domains.
Routing Rules (Optional)
The create/edit dialog has a Routing tab where you can add smart-routing rules. A rule sends matching visitors to an alternate destination; everyone else falls through to the link's default target. Rules are evaluated top to bottom and the first match wins.
| Rule type | Matches on | Example value |
|---|---|---|
country | Visitor's 2-letter country code | US |
device | Device type: mobile, tablet, or desktop | mobile |
time | Server-local hour window HH-HH (wraps past midnight, e.g. 22-06) | 09-17 |
Each rule has its own target URL (which must also be http(s)), and you can add up to 20 rules per link. Example: send mobile visitors to your app-store page while everyone else gets the web page.
Once you've filled in the form:
- Click the Create button
- The form submits your data via the GraphQL API
- On success, the modal closes and your new shortlink appears at the top of the dashboard list
- A brief success notification appears
If there's an error (invalid URL, duplicate slug, server issue), the error message is displayed inline on the form.
After Creation
Your new shortlink is now live and ready to use:
- Copy to clipboard — click the copy icon next to the link to copy the full short URL
- Share — paste the link anywhere: social media, emails, SMS, printed materials, QR codes
- Edit — click the pencil icon to modify the target URL, title, tracking setting, or routing rules
- View analytics — click the link row to see detailed click data (see Analytics)
Tips for Good Slugs
- Keep it short — the whole point is brevity; aim for 3–15 characters
- Make it memorable —
summer-saleis better thanx7kq2p - Make it descriptive — the slug should hint at where the link goes
- Use hyphens for readability —
my-cool-linkis easier to read thanmycoollink - Avoid generic terms —
link1,test,tempbecome confusing as your collection grows - Consider branding — if you share links publicly, your slug reflects on you
Limitations
- Each shortlink has one default destination, optionally overridden by routing rules (country/device/time); there is no percentage-based A/B testing
- Slugs are first-come, first-served across all users on your lnkify instance
- There is no built-in expiration for shortlinks (though API keys can create ephemeral links)
- Link creation is subject to rate limits configured by your server administrator
Next: Managing Shortlinks