Creating a Link
Enter Destination URL
Paste the long URL you want to shorten:Dub will automatically fetch Open Graph metadata (title, description, image) from the destination URL.
Customize Short Link
- Domain
- Key (Slug)
Choose from your workspace domains:
- Default domain (e.g.,
dub.sh) - Custom domains you’ve added
- Primary domain is selected by default
Link Configuration Options
Basic Settings
Destination URL
Destination URL
The target URL where users will be redirected.
URLs are stored as
LongText in the database to support very long URLs.Short Link Domain and Key
Short Link Domain and Key
Customize your branded short link:Full short link:
https://dub.sh/githubMetadata and Appearance
Custom Open Graph Tags
Custom Open Graph Tags
UTM Parameters
Automatically append UTM tracking parameters to your destination URL:UTM parameters are automatically extracted from your destination URL if already present.
Advanced Targeting
Device-Specific Redirects
Device-Specific Redirects
Redirect users to different URLs based on their device:Perfect for directing users to platform-specific app stores or experiences.
Geographic Targeting
Geographic Targeting
Route users to different URLs based on their country:Use ISO 3166-1 alpha-2 country codes.
Conversion Tracking
Enable Conversion Tracking
Enable Conversion Tracking
Track leads and sales attributed to this link:When enabled, Dub will:
- Track click events with unique click IDs
- Associate leads with the link
- Attribute sales and conversions
- Calculate revenue and ROI
Link Expiration
Set Expiration Date
Set Expiration Date
Automatically disable links after a specific date:
Password Protection
Require Password
Require Password
Add password protection to your links:Users must enter the password before being redirected.
A/B Testing
Multi-Variant Testing
Multi-Variant Testing
Test different destination URLs with traffic splitting:Traffic is distributed based on weights (must sum to 100).
Creating Links via API
- TypeScript SDK
- REST API
- CLI
Link Schema
Complete link object structure:Link Management
Organizing Links
- Folders
Group related links in folders:
- Navigate to Links > Folders
- Create folders by campaign, product, or channel
- Drag and drop links into folders
- Filter analytics by folder
Bulk Operations
Import Links
Import Links
Import multiple links via CSV:
- Download the CSV template
- Fill in URL, domain, key, and metadata
- Upload to Dub
- Review and confirm import
Export Links
Export Links
Export your links to CSV for backup or analysis:
- Select links to export or export all
- Includes all metadata and analytics
- Compatible with spreadsheet software
Link Analytics
View detailed analytics for each link:- Clicks: Total clicks over time
- Locations: Geographic distribution
- Devices: Desktop, mobile, tablet breakdown
- Browsers: Browser and OS statistics
- Referrers: Traffic sources
- Conversions: Leads and sales attributed
Public analytics can be enabled per link to share statistics via a public URL.
Best Practices
Use Descriptive Keys
Use Descriptive Keys
Choose memorable, descriptive keys that hint at the destination:✅
dub.sh/github-repo
❌ dub.sh/abc123Enable Conversion Tracking
Enable Conversion Tracking
Always enable conversion tracking for marketing and attribution campaigns to measure ROI.
Organize with Tags
Organize with Tags
Set Expiration Dates
Set Expiration Dates
For time-limited campaigns, set expiration dates to automatically disable links and redirect to a fallback page.
Test Before Sharing
Test Before Sharing
Always test your short links before sharing in campaigns to verify:
- Destination URL is correct
- UTM parameters are appended
- Device/geo targeting works
- OG tags display properly on social media