How to create a short link on Dub?

Learn how to create your first short link on Dub and start tracking your links.

Steven Tey

Written by Steven Tey

Our link builder comes with powerful features like UTM builder, device targeting, password protection, expiration dates, and more.

Dub is also the only link management tool that lets you customize the social media cards for your links, so you can have full control over how your links look when shared on social media.

In this article, we will take a look at how you can leverage these features to create your first short link on Dub.

When you sign up for Dub, you have the option to choose between the default dub.sh domain or your own custom domain to create short links.

Onboarding screen where you can choose between Dub.sh links or custom domain links
Onboarding screen where you can choose between Dub.sh links or custom domain links

Here are the difference between the two options:

Default dub.sh linksCustom domain links
Setup easeNo setup required – you can start creating short links right awayYou will need to create a project and set up your custom domain first before you can start creating short links.
BrandingDub branding on the short linkYour own branding on the short link
Dashboard locationapp.dub.co/linksCan be found in the project select menu at the top menu bar
Link history30 days30 days - Unlimited (Pro plan)
TagsUnavailableCan be used to organize links
Link cloakingUnavailableCan be used to mask destination URL with your short link
Geo TargetingUnavailableAvailable on the Pro plan

There are 3 ways to open the Dub link builder to create a short link:

  1. Slowest: Click on the "Create link" button on the dashboard.
  2. Faster: Use the keyboard shortcut c to open the link builder.
  3. Fastest: Just paste in a valid URL into the dashboard. This will automatically open the link builder and pre-fill the URL field.
The Dub link builder
The Dub link builder

Inside the link builder are the following fields:

  1. Destination URL: The URL that you want to shorten.
  2. Short link: The short link that will be generated for you. You can generate a random slug by clicking the "Randomize" button or by typing in your own.
  3. Choose a tag (custom domain links only): Choose a tag to organize your links. You can learn more about tags here.
  4. Custom Social Media Cards: Customize how your links look when shared on social media. Learn more.
  5. UTM Builder: Add UTM parameters to your links. Learn more.
  6. Link Cloaking: Mask your destination URL with your short link. Learn more.
  7. Password Protection: Protect your links with a password. Learn more.
  8. Expiration Date: Set an expiration date for your links. Learn more.
  9. Device Targeting: Set a custom destination URL for iOS and Android devices. Learn more.
  10. Geo Targeting (Pro plan only): Redirect your users to different links based on their location. Learn more.
  11. Social Previews: See how your links will look when shared on social media.
  12. Comments: Add comments to your links – for you and your team. Learn more.

Custom social media cards

Dub is the only link management tool that lets you customize the social media cards for your links, so you can have full control over how your links look when shared on social media.

To leverage this feature, toggle the "Custom Social Media Cards" switch in the link builder. This will reveal the following fields:

  1. Image: The image that will be used for the social media card. You can upload an image from your computer or drag and drop an image into the field (recommended size: 1200 x 630 pixels, max 1.5MB).
  2. Title: The title that will be used for the social media card (max 120 characters).
  3. Description: The description that will be used for the social media card (max 240 characters).
Create custom social media cards for your links
Create custom social media cards for your links

Here's a demo of how this feature works:

Introducing a cool new feature for @dubdotsh – OG Image Proxy 📸✨ How it works: 1. Add a custom OG image in front of your target URL 2. Bots like Twitter/FB will be served this image 3. Users will be redirected to your target URL h/t to @rauchg for the idea + initial code 🙏

UTM builder

You can use the UTM builder to populate UTM parameters for your links.

  • Referral (ref): The website that is sending traffic to your link.
  • UTM Source (utm_source): The source of your traffic (e.g. Facebook, Twitter, etc.).
  • UTM Medium (utm_medium): The medium of your traffic (e.g. social, email, etc.).
  • UTM Campaign (utm_campaign): The name of your campaign (e.g. summer2023)
  • UTM Term (utm_term): The term of your campaign (e.g. running+shoes)
  • UTM Content (utm_content): The content of your campaign (e.g. logo+link)
Use the UTM builder to populate UTM parameters for your links
Use the UTM builder to populate UTM parameters for your links

You can mask your destination URL with your short link by toggling the "Link Cloaking" switch in the link builder.

Toggling the 'Link Cloaking' switch in the link builder
Toggling the 'Link Cloaking' switch in the link builder

When this is enabled, your short link will be shown in your users' browser address bar when they visit your link instead of the destination URL.

Masking 'slack.com' with 'dub.sh/slack'
Masking 'slack.com' with 'dub.sh/slack'

This feature is only available for short links created with a custom domain.

A few caveats for the URL masking feature:

  1. This feature is only available for Pro plans and above.
  2. URL masking might not work for certain websites that have security measures in place to prevent this (e.g. twitter.com).

Password protection

You can protect your links with a password by toggling the "Password Protection" switch in the link builder.

With Dub, you can protect your links with a password
With Dub, you can protect your links with a password

Then, when you share your link, the user will be prompted to enter a password before they can access the destination URL.

An example of a password protected page
An example of a password protected page

Here's a demo: dub.sh/password (password is dub)

Expiration date

You can set an expiration date for your links by toggling the "Expiration Date" switch in the link builder.

Setting an expiration date for your Dub links
Setting an expiration date for your Dub links

If you set an expiration date for your link, the user will be redirected to a 404 page when they try to access the link after the expiration date.

Device targeting (iOS / Android)

Device targeting is a powerful feature that lets you personalize the destination URL for your links based on the user's device type.

For example, you can set a custom destination URL for iOS devices by toggling the "iOS Targeting" switch in the link builder, and a different URL for Android devices by toggling the "Android Targeting" switch in the link builder.

Use device targeting to personalize your link's behavior based on the user's device type
Use device targeting to personalize your link's behavior based on the user's device type

This is particularly useful if you want to send iOS users to the App Store to download your iOS app, and Android users to the Google Play Store to download your Android app.

In both cases, the main Destination URL will be used as the fallback URL that will be used if the user's device type does not match the targeting rules.

Geo Targeting

This feature is only available for Pro plans and above.

Geo Targeting is a powerful feature that lets you redirect your users to different links based on their location.

This is useful if you want to do location-based personalization. For example, you can redirect your UK users to a UK-specific landing page, with the rest of the world going to your global landing page.

To use this feature, toggle the "Geo Targeting" switch in the link builder. This will reveal the following fields:

  1. Country: The country that you want to target.
  2. URL: The URL that you want to redirect your users to if they are from the country that you have selected.
Use Geo Targeting to redirect your users to different links based on their location
Use Geo Targeting to redirect your users to different links based on their location

You can also add multiple geo-targeting rules by clicking on the "Add location" button.

You can add comments to your links by toggling the "Comments" switch in the link builder.

Adding comments to your links in the Dub link builder
Adding comments to your links in the Dub link builder

When you add a comment to your link, it will be visible to you and your team as a message bubble on the link card.

Comments are visible as message bubbles on the link card
Comments are visible as message bubbles on the link card

Did this answer your question?