URL Shortener
Internal tool for turning long Cloudflare / SharePoint / drawing-server URLs into short, trackable links to share with consultants and trades.
The admin lives at /url-shortener. Public redirects are served from /s/<code> on the same domain (e.g. https://psecxsaiyu.work/s/aB3xY9).
Signing in
The page is gated by the same email + 4-digit PIN flow as /website. One sign-in covers both pages for 8 hours.
- Open
/url-shortener. Enter your work email (@psecprojects.com.auor@saiyu.com.au). - A 4-digit code arrives by email within a few seconds. Enter it. Codes expire after 10 minutes.
- You're in until the 8-hour session lapses or you press Sign out.
If your email isn't on the allow-list the request silently no-ops — you won't get a code. Talk to GZ to be added.
Creating a link
The form takes seven inputs:
| Field | Required | Notes |
|---|---|---|
| Long URL | yes | Must be http:// or https://. Anything else is rejected. |
| Project Code | yes | Free text, normalised to uppercase. Examples: K1, K3, GE1. |
| Reason for Issue | yes | Free text. Examples: DA, CC, Draft, Tender. |
| Address | no | Site / delivery address. |
| Description | no | Notes about what the link points to — visible to other signed-in users in the history list, never to recipients. |
| Expires at | conditional | Pick a future date/time, or check Permanent. |
| Permanent | — | When checked, the expiry input is disabled and the link never expires. |
On submit you'll see the generated short URL with a copy button. Paste that into your email or message — the recipient does not need to sign in.
Title format
Every link gets an auto-generated title: YYYYMMDD-PROJECT-REASON. The date is the calendar date in Australia/Sydney (so it stays consistent regardless of where you're working from).
Examples:
20260429-K1-DA20260429-K3-CC20260429-GE1-Draft
The title is the primary identifier in the history list — there's no separate "name" field.
History view
The history table shows every link ever created. To keep the default view scannable:
- Without a search query — only links from the last 14 days are shown. A caption tells you how many older links are hidden.
- With a search query — the 14-day window is bypassed and the search runs across the full history. The query matches case-insensitively against title, long URL, description, address, project code, reason, creator email, and short code.
Other table columns: short URL (with copy button), long URL (truncated, hover for full), description, address, who created it, when it was created (Sydney time), expiry, click count, delete button.
Expired links stay in the history with an expired badge so you can clean them up.
Click tracking
Each visit to /s/<code> increments the link's click counter. The increment runs in the background after the redirect, so it never slows the recipient down. The counter shows total visits — there's no per-click log of who clicked or when.
Under burst load (many simultaneous clicks on the same link) a small number of increments can be lost; for the team's normal usage this isn't visible.
Deleting a link
Press the Delete button on any row. After confirmation the record is removed from storage and /s/<code> immediately starts returning 404. The action applies to permanent and time-limited links alike — there's no archive or undo, so be deliberate.
Anyone signed in can delete any link (creator email is recorded but not used to scope permissions). Treat the delete button as shared-tool etiquette: don't remove someone else's link without checking.
What about expiry?
When a link's Expires at time passes, /s/<code> returns 410 Gone rather than 404 — recipients get a clear "this link has expired" message instead of a generic not-found. The record stays in the history list (with the expired badge) until you delete it.
Permanent links never auto-expire. If you want a link to disappear, set an expiry up front or delete it manually.
Naming convention (legacy guidance)
The auto-generated YYYYMMDD-PROJECT-REASON title is now the canonical name — you don't need to compose a name yourself. The previous manual format ([Project]-[Date]_[Description], e.g. S1-2025.08.20_Arch Drawing for Tender) is no longer needed; use the Description field for any extra context you want recorded against the link.
Security notes
- Don't shorten URLs that contain credentials, signed tokens that grant write access, or anything you wouldn't paste into an email.
- The redirect target is fixed at creation time and can't be edited — if a wrong URL gets shortened, delete the link and create a new one (you'll get a new short code).
- Short codes are 6 random characters from a confusion-free alphabet — there's no way to guess them, but recipients can share them onward, so treat the short URL as having the same reach as the long URL.