Self-hosted UTM shortener
A self-hosted link shortener (for example an open-source tool like YOURLS or Shlink on your own domain) lets you create short campaign links that redirect to long UTM-tagged destinations. Running it yourself keeps the click logs first-party, the redirect domain on-brand, and the UTM mapping fully under your control.
What self-hosting gives you
A self-hosted shortener stores the short-to-long mapping on infrastructure you control. The short link is brand-domain and stable; the long target carries the full UTM query string. Open-source options such as YOURLS or Shlink are commonly run this way.
The payoff is ownership: click logs are yours, you are not subject to a third party's retention or shutdown, and you can rotate or edit destinations without changing the printed/shared short link.
- Short link on your own domain
- Long destination keeps the full UTM string
- Click logs stay first-party and self-hosted
Redirect hygiene
Use a server-side HTTP redirect (301/302) so the UTM-tagged destination loads directly and analytics reads the tags. Avoid client-side or meta-refresh hops that can drop the query string or confuse referrer handling.
Keep the UTM convention identical to your other channels, and confirm the expanded URL still validates against your taxonomy. Treat the short domain like any campaign asset: governed, documented, and monitored for broken targets.
How it appears in analytics and logs
A landing hit whose final URL carries the expected UTM set, reached via your own short domain, confirms the self-hosted shortener expanded the link and preserved the tags through the redirect.
Diagnostic use case
Issue branded short links for campaigns that expand to fully UTM-tagged URLs, while keeping click data and redirect infrastructure in your own hands.
What WebmasterID can help detect
WebmasterID records the UTM-tagged landing hit after your self-hosted shortener redirects, so campaigns using branded short links still attribute to the correct source server-side.
Common mistakes
- Using a client-side redirect that drops the UTM query string.
- Storing raw IPs or personal data in self-hosted click logs unnecessarily.
- Letting short-link destinations drift out of sync with your UTM taxonomy.
Privacy and accuracy notes
Self-hosting keeps click logs first-party; store only what you need and avoid attaching raw IPs or personal identifiers. WebmasterID records the resulting landing touch without exact location or a visitor identity.
Related pages
- UTM and shortlink services
Shortlink services redirect a short URL to a longer destination. They can carry UTM parameters to the final page, or strip and re-add them, depending on configuration. Knowing how your shortener handles the query string is essential so a memorable short URL does not silently lose its campaign attribution.
- UTM parameters in redirects
Redirects are where UTM attribution quietly dies. A 301/302 or a link shortener that does not forward the query string strips your tags before the visitor reaches the landing page. This page explains how to preserve UTM parameters through redirects, shorteners, and vanity URLs.
- UTM and redirect services
Redirect services and link-management platforms sit between a click and your landing page. Depending on configuration they may preserve the UTM parameters, append their own, or drop the query string entirely. Knowing which behavior applies is essential, because a redirect that loses UTM silently breaks campaign attribution.
- Campaign links
Govern short links that expand to tagged destinations.
Sources and verification notes
- YOURLS — open-source URL shortenerSelf-hostable shortener; redirects short links to long UTM-tagged URLs.
- Shlink — self-hosted URL shortenerOpen-source self-hosted shortener with first-party click data.
Last reviewed 2026-06-24. Facts are checked against primary/official sources where available; uncertain specifics are marked “Data not yet verified” rather than guessed.