Overview
Custom domains allow you to use your own branded domain (e.g., go.yourcompany.com) instead of Dub’s default domains for your short links. This builds trust, strengthens brand recognition, and provides complete control over your link infrastructure.
Why Use Custom Domains?
Brand Recognition Use your own domain to reinforce your brand with every link you share
Trust & Credibility Branded links are more trustworthy and have higher click-through rates
Professional Appearance Show professionalism with consistent branding across all touchpoints
Complete Control Own your link infrastructure and avoid dependency on third-party domains
Adding a Custom Domain
Navigate to Domains
Go to Settings → Domains in your workspace dashboard.
Click Add Domain
Click the “Add Domain” button to open the domain configuration modal.
Enter Your Domain
Enter your domain or subdomain (e.g., go.yourcompany.com).
Configure DNS
Add the required DNS records to your domain provider.
Verify Domain
Wait for DNS propagation and click “Verify” to confirm ownership.
DNS Configuration
For Subdomains (Recommended)
If you’re using a subdomain like go.yourcompany.com, add a CNAME record:
Type: CNAME
Name: go
Value: cname.dub.co
TTL: 3600 (or your provider's default)
For Apex Domains
If you’re using an apex domain like yourshortdomain.com, add an A record:
Type: A
Name: @
Value: 76.76.21.21
TTL: 3600 (or your provider's default)
Apex domains cannot use CNAMEs due to DNS specifications. Use A records or consider using a subdomain instead.
Domain Verification
After adding DNS records:
DNS propagation can take 5-72 hours (usually much faster)
Check verification status in the Domains settings
Dub automatically checks for verification every few minutes
You’ll receive an email once verification is complete
The domain card will show:
✅ Green checkmark when verified
⏳ Yellow pending icon while waiting
❌ Red X if verification fails
// Check domain status via API
const domain = await fetch ( '/api/domains/go.yourcompany.com' , {
headers: { Authorization: 'Bearer YOUR_API_KEY' }
});
const { verified } = await domain . json ();
console . log ( 'Verified:' , verified );
Domain Configuration
Primary Domain
Set a domain as your workspace’s primary domain:
Open Domain Settings
Click on the domain card in Settings → Domains.
Set as Primary
Toggle “Set as Primary Domain” to make it the default for new links.
// API Example: Set primary domain
await fetch ( '/api/domains/go.yourcompany.com' , {
method: 'PATCH' ,
headers: {
'Authorization' : 'Bearer YOUR_API_KEY' ,
'Content-Type' : 'application/json'
},
body: JSON . stringify ({ primary: true })
});
The primary domain is automatically selected when creating new links in the dashboard.
Domain Placeholder
Set a custom placeholder for random key generation:
// Example: Set custom placeholder
await fetch ( '/api/domains/go.yourcompany.com' , {
method: 'PATCH' ,
body: JSON . stringify ({
placeholder: 'https://go.yourcompany.com/your-link'
})
});
Expired URL Redirect
Set a default URL for expired links on this domain:
// Example: Set expired URL
await fetch ( '/api/domains/go.yourcompany.com' , {
method: 'PATCH' ,
body: JSON . stringify ({
expiredUrl: 'https://yourcompany.com/link-expired'
})
});
When a link expires without a link-specific expired URL, users are redirected here.
Not Found URL Redirect
Set a default URL for non-existent links on this domain:
// Example: Set 404 redirect
await fetch ( '/api/domains/go.yourcompany.com' , {
method: 'PATCH' ,
body: JSON . stringify ({
notFoundUrl: 'https://yourcompany.com'
})
});
Without a notFoundUrl, visitors to non-existent links see a 404 page.
Domain Logo
Upload a logo to customize QR codes for this domain:
Open domain settings
Click “Upload Logo”
Select an image file (PNG, JPG, SVG)
Logo will appear in QR codes for links using this domain
// Upload logo via API
await fetch ( '/api/domains/go.yourcompany.com' , {
method: 'PATCH' ,
body: JSON . stringify ({
logo: 'https://yourcompany.com/logo.png'
})
});
Link Retention
Configure automatic link cleanup for the domain:
// Example: Delete links older than 30 days
await fetch ( '/api/domains/go.yourcompany.com' , {
method: 'PATCH' ,
body: JSON . stringify ({
linkRetentionDays: 30
})
});
// Disable automatic deletion (default)
await fetch ( '/api/domains/go.yourcompany.com' , {
method: 'PATCH' ,
body: JSON . stringify ({
linkRetentionDays: null
})
});
Links older than the retention period are automatically deleted. This action is permanent and cannot be undone.
Individual links can opt out of retention cleanup:
// Disable cleanup for specific link
await fetch ( '/api/links/link_123' , {
method: 'PATCH' ,
body: JSON . stringify ({
linkRetentionCleanupDisabledAt: new Date (). toISOString ()
})
});
Registering Domains
Register new domains directly through Dub:
Search for Domain
In Domains settings, click “Register Domain” and search for availability.
Complete Purchase
Review pricing and complete the registration.
Auto-Configuration
DNS is automatically configured - no manual setup required.
Start Using
Domain is immediately ready for creating short links.
Auto-Renewal
Registered domains auto-renew annually by default:
// Disable auto-renewal
await fetch ( '/api/domains/yourshortdomain.com/renewal' , {
method: 'PATCH' ,
body: JSON . stringify ({
autoRenewal: false
})
});
You’ll receive email reminders before renewal. Default renewal fee is $12/year.
Deep Links & Universal Links
iOS Universal Links
Configure Apple App Site Association for deep linking:
// Example: Set iOS deep linking configuration
await fetch ( '/api/domains/go.yourcompany.com' , {
method: 'PATCH' ,
body: JSON . stringify ({
appleAppSiteAssociation: {
applinks: {
apps: [],
details: [{
appID: 'TEAM_ID.com.yourcompany.app' ,
paths: [ '*' ]
}]
}
}
})
});
This serves the required /.well-known/apple-app-site-association file.
Android App Links
Configure Android asset links:
// Example: Set Android deep linking configuration
await fetch ( '/api/domains/go.yourcompany.com' , {
method: 'PATCH' ,
body: JSON . stringify ({
assetLinks: [{
relation: [ 'delegate_permission/common.handle_all_urls' ],
target: {
namespace: 'android_app' ,
package_name: 'com.yourcompany.app' ,
sha256_cert_fingerprints: [ 'XX:XX:XX:...' ]
}
}]
})
});
This serves the required /.well-known/assetlinks.json file.
Domain Transfer
Transfer domains between workspaces:
Initiate Transfer
Open domain settings and click “Transfer Domain”.
Select Workspace
Choose the destination workspace.
Confirm Transfer
Confirm the transfer - all links remain intact.
// API Example: Transfer domain
await fetch ( '/api/domains/go.yourcompany.com/transfer' , {
method: 'POST' ,
body: JSON . stringify ({
newWorkspaceId: 'ws_new123'
})
});
Only workspace owners can transfer domains. All links and analytics move with the domain.
Archiving Domains
Archive domains you no longer actively use:
// Archive a domain
await fetch ( '/api/domains/go.yourcompany.com' , {
method: 'PATCH' ,
body: JSON . stringify ({ archived: true })
});
// Unarchive
await fetch ( '/api/domains/go.yourcompany.com' , {
method: 'PATCH' ,
body: JSON . stringify ({ archived: false })
});
Archived domains and their links remain functional. They’re just hidden from the main domains list.
Deleting Domains
Permanently delete a domain:
Archive First
Consider archiving before deleting.
Backup Links
Export or migrate links to another domain if needed.
Delete Domain
Click “Delete” in domain settings and confirm.
// API Example: Delete domain
await fetch ( '/api/domains/go.yourcompany.com' , {
method: 'DELETE'
});
Deleting a domain does not delete its links. Links will show as having an invalid domain.
Domain Limits
Domain limits by plan:
Free : Use default Dub domains only
Pro : 3 custom domains
Business : 10 custom domains
Enterprise : Unlimited custom domains
API Reference
For detailed API documentation:
Best Practices
Use Subdomains Prefer subdomains like go.yourcompany.com over apex domains for easier DNS management
Keep It Short Choose short, memorable domains for better link readability
Set 404 Redirects Configure notFoundUrl to provide a better experience for broken links
Enable HTTPS Dub automatically provisions SSL certificates for all custom domains