Branded short links on your own domain. Turn any long address into https://your-site.com/s/spring-sale, then see who clicks it, when, from where and on which device, with search engines and other robots kept out of the counts.

Your Own Domain

Links live on your site, under a short prefix you choose (/s/ by default). No third-party shortener, no shared domain.

Custom or Generated Codes

Type a readable alias such as black-friday, or leave the field empty and get a random code that avoids look-alike characters.

Click Statistics

Clicks per day, unique visitors, top referrers, countries, devices, browsers and operating systems, over 7, 30, 90 or 365 days.

Bots Excluded

Search engine crawlers, link previews and scripts are logged for the record but never counted in any figure.

Expiry & Fallback

Give a link an end date or switch it off at any time. Visitors of a dead link land on a page of your choice.

Privacy Friendly

IP addresses are never stored, only a one-way hash. The detailed click log can be turned off entirely.

Use Cases

Printed Material and QR Codes

A flyer, a business card or a product package can only carry a short, readable address.

  • Print your-site.com/s/menu instead of a long URL with tracking parameters.
  • Point the same printed link to a new page later: with a temporary (302) redirect, the change reaches every visitor at once.
  • Download the link’s QR code (SVG or PNG, drawn on your own server) for the print shop.
  • See how many people typed it and how many scanned it, day by day: scans are counted apart.

Newsletters, Social Profiles and Ads

You share the same destination in several places and want to know which one works.

  • Create one short link per channel (/s/news-may, /s/bio, /s/ad-summer), each pointing to the same page.
  • Compare clicks, referrers and devices between them on their statistics pages.
  • Keep your UTM tags in the destination: visitors only ever see the short address.

Time-limited Offers

A promotion ends on a fixed date and its link must stop working with it.

  • Set an expiry date on the link: afterwards visitors are sent to your fallback page instead of an outdated offer.
  • The link’s statistics are kept after it expires.

Requirements

  • Larapen CMS v1.0.16 or later
  • PHP 8.3+
  • MySQL 8.0+
No dependencies: This add-on works on its own. Two optional extras improve the statistics:
  • GeoIP (enabled in Admin → Settings → Localization) is needed to detect the country of each click.
  • When the Site Statistics add-on is active, its more precise browser, device and robot detection is used automatically.

Installation

Step 1: Upload the Add-on

In the admin panel, go to Admin → Extensions → Add-ons and click the Upload Add-on button. Select the add-on’s ZIP file: the system extracts it automatically and the add-on appears in the installed add-ons list.

Step 2: Activate the Add-on

Find Short Links in the list and click Activate. You are asked for its purchase code. Its database tables and permissions are set up automatically, and a Short Links entry appears in the admin sidebar.

Step 3: Check the Settings

Open Admin → Short Links → Settings. The defaults work as they are (links under /s/, temporary redirects, click tracking on), but it is best to choose the address prefix and a fallback page before sharing your first links.

Step 4: Give Access to Your Team

Administrators get every permission. For other staff roles, grant the Short Links permissions they need in Admin → Users → Roles.

Purchase Code (License Key)

Short Links is sold as a separate product, so it has its own purchase code (license key), distinct from the purchase code of the main application and from the one of every other add-on. You are asked for it when you activate Short Links in Admin panel → Add-ons.

Our products are sold on three platforms. The way you receive a purchase code depends on where you bought the product.

Platform / Marketplace How you get the purchase code Where to find it again
bedigit.com Store
In-site purchase (Shop)
Generated automatically when the order is paid, then sent by email, either in its own license email, or inside the order confirmation email. My Account → My Licenses on bedigit.com
Gumroad Created as soon as Gumroad notifies us of the sale, then sent in a separate email, in addition to the Gumroad receipt. The license email, your Gumroad Library, and My Account → My Licenses on bedigit.com
Envato Market
CodeCanyon
Issued by Envato, not by us, and never sent by email: you download it yourself from your Envato account. Envato account → Downloads → License certificate & purchase code
Check your spam folder. For both bedigit.com Store and Gumroad purchases, the purchase code is delivered by email. Automated license emails are very often filtered, so if the message is not in your inbox, look in your spam / junk folder before contacting support, and add our sender address to your contacts or allow list.

1. bedigit.com Store (in-site purchase)

  • As soon as the order’s payment status becomes Paid, a license key is generated automatically for every licensed item in the order (one key per purchased unit: buying 3 units gives 3 distinct keys).
  • It is emailed to the address used on the order, either in a dedicated license email or inside the order confirmation email. Check your inbox and your spam / junk folder.
  • The key stays available in your account under My Account → My Licenses. Keys are masked in the list; open the license detail page to reveal and copy the full key, see the domains it is activated on, and deactivate a domain to free an activation slot.
  • The matching invoice is under My Account → My Orders.

2. Gumroad

  • A Gumroad purchase produces two separate emails: the Gumroad receipt (sent by Gumroad, giving access to the files) and a license key email (sent by bedigit.com) that contains your purchase code.
  • The license key email is generated as soon as Gumroad notifies us of the sale, so it normally arrives within seconds of the payment. Here too, check your inbox and your spam / junk folder.
  • When the Gumroad product uses Gumroad’s own license-key feature, the same key also appears in your Gumroad receipt and under Library → your purchase on gumroad.com.
  • Use the same email address on bedigit.com as on Gumroad: your keys are then linked to your account automatically and listed under My Account → My Licenses, even if you register after the purchase. You can also add a Gumroad key manually from My Account → My Gumroad Licenses.

3. Envato Market (CodeCanyon)

  • Envato purchase codes are issued and delivered by Envato Market, never emailed by us, so there is nothing to look for in your spam folder: you retrieve the code from your Envato account.
  • Log in to your Envato / CodeCanyon account, open the Downloads page, find the item, and choose License certificate & purchase code from the Download dropdown. The code is written in that certificate.
  • An Envato purchase code looks like 12345678-90ab-cdef-1234-567890abcdef (8-4-4-4-12 characters). It never changes, and renewing item support does not issue a new one.
  • Official Envato article: Where Is My Purchase Code?
Lost your purchase code? Search your mailbox (spam folder included) for “license” or “purchase code”, then check My Account → My Licenses on bedigit.com for Store and Gumroad purchases, or Downloads → License certificate on Envato. If it is still missing, open a ticket on our Help Center with your order number (Store), Gumroad sale ID or buyer email (Gumroad), or Envato username and item name (Envato).

Everything is managed from Admin → Short Links: All Links, Add New and Settings.

Click Add New (or New Short Link on the list). The form has two parts.

Link

  • Destination URL (required): the full address visitors are sent to, starting with http:// or https://, for example https://your-site.com/offers/spring?utm_source=newsletter. It can be a page of your site or of any other site. A short link cannot point to another short link of the same site (that would only add a hop, or loop back to itself).
  • Short code (optional): the part after the prefix. Leave it empty for a random code, type your own, or click Generate to fill in a random one you can see before saving. See Short Codes.
  • Title (optional): a name for your own reference, such as “Spring newsletter” or “Footer button”. Shown in the list and searchable.
  • Notes (optional): internal notes, never shown to visitors.

Publishing

  • Status: Active (the link redirects) or Disabled (visitors get the fallback page). A link can also be switched on or off directly from the list.
  • Redirect type: Default uses the add-on setting; you can force 301 (permanent) or 302 (temporary) for this link only. See Redirect Type.
  • Expires on (optional): after this date and time the link stops redirecting and shows as Expired. Its statistics are kept. A new link needs a date in the future; an existing link accepts a past date, which is a way to retire it at once without deleting it.

After saving, a confirmation shows the full short link, ready to share. It can be copied at any time from the list or the statistics page.

Changing a code breaks shared links. When you edit a link, the short code can be changed, but every copy of the old address already printed or shared stops working. Change the destination instead whenever possible. Leaving the code field empty on edit keeps the current code.
Custom code Generated code
When You type it in the Short code field You leave the field empty
Characters Letters, digits, - and _, starting and ending with a letter or a digit Lowercase letters and digits, without the easy-to-confuse 0, o, 1, l and i
Length 3 to 64 characters Set in the settings, 6 by default (about 900 million combinations), between 4 and 16
Example /s/black-friday /s/k7mq2x
  • Codes are not case-sensitive. They are stored in lower case, so /s/Promo, /s/PROMO and /s/promo all open the same link. People typing an address from a poster do not have to get the capitals right.
  • Each code is unique, including links in the trash: a trashed link keeps its code so that restoring it brings its shared addresses back to life. To reuse the code of a trashed link, delete that link permanently first.

Short Links → All Links shows every link, newest first, with:

  • Short link: the code, its title, and a button that copies the full short address to the clipboard;
  • Destination: where the link goes;
  • Clicks: the number of human clicks since the link was created (or since its counts were last reset), with a small reset button;
  • Status: an on/off switch, plus an Expired badge once the expiry date has passed;
  • Created date and the row actions: Statistics, QR code (preview and downloads), Edit, Delete.

In the admin, the short link and its open icon take you straight to the destination: checking a link from the admin never adds a click to its statistics.

Above the table, a search box looks through codes, titles, destinations and notes, and a status filter shows Active, Disabled or Expired links only. Select several rows to delete them in one go.

The Export button downloads the list as CSV, Excel (.xlsx or .xls), JSON, XML or tab-separated text. The file holds the links the list currently shows (same search and status filter), one row per link: code, full short address, destination, title, status (active, disabled or expired), expiry date, redirect type (empty when the link follows the default), clicks, QR code scans, last click, owner, notes and creation date.

The Import button (permission shortlinks.create, plus shortlinks.edit to update) reads a file in the same formats and the same column order as the export, so the simplest way to start is to export, edit the file, and import it back:

  • rows are matched by code (not case-sensitive). Choose whether the import creates new links, updates existing ones, or both;
  • an empty code creates a link with a random code; an empty cell in an update keeps the current value;
  • the destination must be a full http:// or https:// address; the status can be active, disabled or expired (imported as active, the expiry date decides);
  • a new link belongs to the user named in the Owner column when that e-mail address has an account on your site, otherwise to you;
  • clicks, QR code scans, last click and creation date are figures: they are ignored on import;
  • a code held by a link in the trash is reported as an error: restore that link or delete it permanently first.

Rows with an error are skipped and listed after the import; the other rows are imported.

Deleted links go to the Trash, where they can be restored or deleted permanently. A link in the trash does not redirect. Deleting a link permanently also deletes its click log.

Statistics

Click the Statistics action of a link in the list to open its report. Choose the period at the top: 7, 30, 90 or 365 days (30 by default).

Figures

  • Clicks (N days): human clicks during the selected period, counted from the click log (see Click Tracking).
  • Unique visitors (N days): distinct visitors during the selected period, told apart by a hash of their IP address (see Privacy).
  • QR code scans (N days): the clicks of the selected period that came from scanning the link’s QR code (see QR Codes). They are included in Clicks (N days).
  • All-time clicks: the link’s total counter since its creation (or its last reset). It keeps counting even when the detailed click log is off.
  • Bot visits (not counted): visits from robots during the period, shown for information only.
  • Clicks per day: a day-by-day chart of the period.

Breakdowns

The top entries (10 by default) of each of these, for the selected period:

  • Top referrers: the site the visitor came from (for example a social network or a newsletter tool), or “Direct or unknown” for typed, scanned and app links;
  • Top countries: requires country detection, see Click Tracking;
  • Devices: desktop, mobile or tablet;
  • Browsers and Operating systems.

Robots Are Left Out

Search engine crawlers, social network link previews (the card shown when a link is pasted in a chat or a post), uptime monitors, command-line tools and requests without a browser signature are recognized as robots. Their visits are logged but never counted: not in the list, not in any figure or breakdown of the report.

Resetting the Counts

The small reset button next to a link’s clicks count in the list (permission shortlinks.edit) deletes its click log and sets its counter back to zero, for example after testing a link before its launch. This cannot be undone.

QR Codes

Every link has a QR code, generated on your own server: nothing is sent to an outside QR service. Open it from the QR code action of the links list, or from the QR code card of the link’s statistics page, and download it as:

  • SVG: a vector image that stays sharp at any size. Best for print shops and design tools;
  • PNG at 512, 1024 or 2048 pixels: for documents, slides and social posts. Use the largest for print.

Scans Are Counted Apart

The QR code points to the short link with a small marker added, https://your-site.com/s/menu?qr=1. When someone scans it, the click is recorded as a QR code scan and the marker is removed before the visitor is sent on, so the destination never sees it. Scans also count as clicks: the QR code scans figure tells you which share of the clicks came from print.

Turn Count QR code scans off in the settings to encode the bare short link instead. Codes already printed keep working either way: with the option off, their scans are simply counted as ordinary clicks.

Printing Tips

  • Print the code at least 2 cm (0.8 in) wide, and keep the white margin around it: scanners need it.
  • Keep a dark code on a light background. Many scanners cannot read pale or inverted (light on dark) codes.
  • Choose a higher error correction level if the code will be printed on a rough surface, folded, or partly covered by a logo.
  • Scan the final proof with two or three different phones before printing in quantity.

Admin: Settings

Short Links → Settings has four tabs.

Setting Description Default
Links tab
Address prefix The path segment before the code: https://your-site.com/s/{code}. See Address Prefix. s
Generated code length Number of characters of a random code, from 4 to 16. Existing links keep their code. 6
Default redirect type 301 (permanent) or 302 (temporary), used by every link set to “Default”. See Redirect Type. 302
Fallback page Where visitors go when a code is unknown, or its link is disabled, expired or in the trash. Leave empty to show a “page not found” (404) error instead. Must be a full address, for example https://your-site.com/offers. empty
Forward query parameters Pass the parameters added to a short link on to its destination: /s/promo?utm_source=flyer sends the visitor to the destination with utm_source=flyer added. A parameter already present in the destination always wins over the visitor’s. On
Click Tracking tab
Keep a detailed click log Record each click (date, referrer, device, browser, country) for the statistics pages. When off, only the clicks counter of each link is updated. On
Detect the visitor’s country Look up the country of each click with the site’s GeoIP service. Only works when GeoIP is enabled in Admin → Settings → Localization. On
QR Codes tab
Error correction How much of the code can be damaged or covered while it still scans: Low (7%), Medium (15%), Quartile (25%) or High (30%). See QR Codes. Medium
Code colour / Background colour The colours of downloaded QR codes. Black on white
Count QR code scans Add the ?qr=1 marker to QR codes so scans are counted apart. See QR Codes. On
Transparent background Leave the background of downloaded images empty, to lay the code over your own design. Off
Search tab
Smart search / Diacritics search How the search box of the links list matches text. See Search. Site default

Address Prefix

Short links sit at the root of your site, outside the language part of the address (/fr/, /de/…), so that a printed link works whatever the visitor’s language. The prefix must therefore never collide with another address of the site. When you save, it is checked against these rules:

  • lowercase letters, digits, - and _ only, starting and ending with a letter or a digit, 30 characters at most;
  • no two-letter prefix such as go or to, and no xx-yy or xx_yy prefix such as en-us: they look like a language code and would clash with translated pages, even for a language you have not installed yet;
  • no code of an installed language;
  • not the admin panel prefix, nor a reserved word of the platform (api, storage, themes, uploads, vendor…);
  • not the first segment of an existing route of the site or of another add-on (for example blog when a blog is installed). The error names the address it clashes with.

A single letter (s, l, r…) keeps links as short as possible and can never be mistaken for a language. Longer words such as link or promo work too.

Changing the prefix breaks every short link already shared. /s/promo stops working as soon as the prefix becomes l: only /l/promo answers. Choose the prefix once, before your first links go out.

Redirect Type: 302 or 301

  • 302 (temporary), recommended. Browsers ask your site again on every visit, so you can change a destination at any time and every click is counted.
  • 301 (permanent). Browsers remember the destination for good. A visitor who already followed the link goes straight to the old destination afterwards, without passing through your site: a later change of destination does not reach them, and their next clicks are not counted. Use it only for links whose destination will never change.

The setting is the default of every link; the Redirect type field of a link overrides it for that link only.

Click Tracking

  • With Keep a detailed click log off, links still redirect and their all-time clicks counter still grows (robots excepted), but nothing is recorded for the statistics report: its period figures, daily chart and breakdowns stay empty.
  • Country detection needs GeoIP: turn it on and choose a provider in Admin → Settings → Localization (GeoIP card). While GeoIP is off, the Short Links settings page says so and no country is recorded. Robots and private network addresses are never looked up.
  • Clicks are recorded after the visitor has been redirected, so a slow GeoIP provider never delays anyone.

QR Codes

  • Error correction: Medium suits most uses. A higher level makes the code denser (more, smaller squares) but lets it survive scratches, folds or a logo placed over its center; Quartile is a good choice for print, High for a logo or rough surfaces.
  • Colours: any colours work as long as the code stays clearly darker than its background. The tab shows a preview with the saved settings.
  • Changing these settings only affects codes downloaded afterwards; codes already printed keep working.

The Search tab can override, for the links list only, the site-wide search options of Admin → Settings → General → Search: Smart search (words in any order, ranked by relevance) and Diacritics search (accent-insensitive matching). Leave them on the site default unless you need a different behavior here.

Permissions

Activating the add-on creates these permissions. Assign them to roles in Admin → Users → Roles.

Permission Allows
shortlinks.view See the Short Links menu, the links list and each link’s statistics
shortlinks.create Create links
shortlinks.edit Edit links, switch them on or off, and reset their statistics
shortlinks.delete Delete links (one by one or in bulk) and manage the trash: restore, delete permanently, empty
shortlinks.settings.view Open the Short Links settings page
shortlinks.settings.edit Save the Short Links settings

How a Short Link Works

When someone opens https://your-site.com/s/spring-sale:

  1. The code is looked up, whatever its capitalization.
  2. If the link is active and not expired, the visitor is redirected to its destination with the link’s redirect type (the parameters of the short link added, when query forwarding is on).
  3. Otherwise (unknown code, disabled, expired or trashed link) the visitor goes to the fallback page, or gets a 404 error when none is set.
  4. The click is then recorded in the background: counted when a person made it, logged only when a robot did.
  • Short link responses tell search engines not to index them (X-Robots-Tag: noindex, nofollow), so they never compete with your real pages in search results.
  • They are never cached by browsers or proxies, so a change of destination or status applies immediately (except for the 301 caveat above).
  • Short links have no page of their own: there is nothing to style in your theme, and they work with every theme.

Privacy

  • IP addresses are never stored. Each click keeps only a keyed, one-way hash of the address, enough to count unique visitors but not to recover the address. The hash depends on your site’s application key, so it cannot be compared with another site’s data.
  • A click record holds: the date, the hashed address, the browser signature (user agent), the referrer address, the country code, the device type, the browser and the operating system.
  • No cookie is set and nothing is stored on the visitor’s device.
  • To collect as little as possible, turn off Detect the visitor’s country, or Keep a detailed click log to record nothing but a clicks counter.
  • Resetting a link’s statistics, or deleting the link permanently, deletes its click records.

Updating

There are two ways to update this add-on: via the admin panel (recommended) or manually replacing files.

Method 1: Admin Panel Upload (Recommended)

  1. Download the latest .zip file of this add-on.
  2. Go to Admin panel → Add-ons and click the Upload button.
  3. Select or drag the .zip file into the upload area.
  4. A confirmation prompt will show the current and new version numbers. Click Replace to proceed.
  5. Go to Admin panel → System Update (/admin/update) to apply any pending database migrations.

Method 2: Manual File Replacement

Step 1: Replace Files

Replace the add-on directory extensions/addons/shortlinks/ with the new version.

Step 2: Run Migrations

php artisan migrate

Pending migrations run once, so the command is safe to repeat.

Step 3: Clear Caches

php artisan config:clear
php artisan route:clear
php artisan view:clear

Step 4: Verify

Open Admin → Short Links → All Links, then follow one of your short links to confirm it still redirects.

Backup first: Always back up your database before running migrations on a production system.

Uninstallation

Switching an add-on off without losing anything is a deactivation: go to Admin panel → Add-ons, find Short Links and click Deactivate.

  • Its routes, views, admin menu entries and permissions stop being registered. Every short link stops redirecting while the add-on is deactivated.
  • Its database tables and all the data they hold are kept (links and click logs), and its files stay under extensions/addons/shortlinks/. Nothing is deleted.
  • The purchase code recorded at activation is kept too, so activating the add-on again does not ask for it.
  • Deactivation is refused while another active add-on depends on this one: deactivate that add-on first.

Click Activate on the same card to switch it back on. Pending migrations are re-run, and every short link answers again exactly as before.

Removing

Removing is permanent and destroys the add-on's data. The Remove button only appears on a deactivated add-on, so removal is always two steps:

  1. Deactivate Short Links (see Uninstallation).
  2. Click Remove on its card and confirm the prompt.

The admin panel then, in one pass:

  • runs the add-on's uninstall hook, if it ships one, while its code is still on disk;
  • revokes the permissions declared in its addon.json;
  • rolls back its migrations (this drops its database tables: every link and every click record) and purges its entries from the migrations table, so a later reinstall migrates from scratch;
  • deletes its published assets: public/addons/shortlinks/, public/vendor/shortlinks/ and storage/app/public/addons/shortlinks/;
  • deletes the add-on directory extensions/addons/shortlinks/;
  • deletes its row in the addons table (the recorded purchase code goes with it) and clears the application cache.
This cannot be undone. Every short link you have shared stops working for good. Back up your database before removing the add-on if you may still need its links: installing it again later creates empty tables, not your old links.

Removal is refused, with an explanatory message and before anything is destroyed, when the add-on is still active, when another active add-on depends on it, or when the web server (PHP) user cannot delete extensions/addons/shortlinks/. In that last case, give that user write permission on the directory and on its parent, then try again.

Deleting the folder over FTP or SSH is not equivalent: the add-on's tables, its entries in the migrations table and its addons row are all left behind, and its card stays in the list. Use Remove in the admin panel instead.

Troubleshooting

A short link shows “page not found” or the fallback page

  • Check the link’s status (Active), its expiry date, and that it is not in the Trash.
  • Check the code and the prefix of the address you opened: after a change of address prefix, old addresses no longer answer.
  • Make sure the add-on is still active in Admin → Add-ons.
  • If you changed the prefix by editing the database or the config file instead of the settings page, clear the route cache: php artisan route:clear (saving the settings page does it for you).

The prefix I want is refused

The error message gives the reason: a language-like prefix (two letters, or xx-yy), a reserved word, or an address already used by the site. See Address Prefix and choose a single letter or a longer word.

“The short code is already used by another link”

Codes are unique and not case-sensitive, so Promo and promo are the same code. The other link may be in the Trash: restore it, or delete it permanently to free the code.

Clicks are not counted

  • Clicks from robots are never counted: opening a link with a command-line tool, a monitoring service or a link-preview bot does not move the counter. Test with a normal browser.
  • With a 301 redirect, browsers that already followed the link go straight to the destination: switch the link to 302 to count every click.
  • Clicks are recorded right after the redirect. If none is ever recorded, look for errors in storage/logs/laravel.log.

The “Top countries” list stays empty

  • Enable GeoIP in Admin → Settings → Localization and check that its provider answers.
  • Turn on Detect the visitor’s country in the Short Links settings.
  • Clicks from local or private network addresses (for example while testing on your own computer) have no country.
  • Clicks recorded before country detection was enabled keep an unknown country.

The statistics report is empty but the link has clicks

Keep a detailed click log is off, or was off during the selected period: only the all-time counter was updated. Turn it on to record new clicks in detail.

Visitors do not receive my campaign parameters

Check that Forward query parameters is on. A parameter that the destination already contains keeps the destination’s value.

Short Links v1.0.0: Part of the Larapen CMS platform.

© BeDigit. All rights reserved.

Was this article helpful?

Thank you for your feedback!

Still need help? Create a support ticket

Create a Ticket

Add-on Guides

2026-11-29