Custom Domain

Add a custom domain to your Organization so that you can create short links with a domain that reflects your brand. This boosts brand recognition and enhances public trust in your links.

Prerequisites

  • You own or manage a custom domain and have access to its DNS settings.

  • Your Hyphen organization member account allows you to create a custom domain in your organization.

  • Your short link domain is different from your website, however you can use a subdomain. For example::

    typewebsiteshort link
    separate domainsacme.comac.me
    subdomainacme.comgo.acme.com

1. Sign in to your DNS

Sign in to your DNS provider's dashboard and access the DNS entries for the domain you plan to use with Hyphen's link URL shortening service.

2. Add DNS records

Choose one of the following options to add the required DNS entries for domain verification. Once your domain is verified, the DNS records must remain in place for continued use with Hyphen.

For a subdomain

Add a CNAME record with the following details. If you’re using a top-level domain and your provider doesn’t support CNAME records at the top level, follow the instructions for domains below.

Record TypeHostnamePoints
CNAME[replace with your domain]hyphen.link

For a domain

Add the following A records to point your domain to Hyphen.

Record TypeHostnamePoints
A[replace with your domain]35.223.212.127
A[replace with your domain]34.127.111.15

🚧

If your domain has any other A records pointing to non-Hyphen IP addresses, remove them to ensure verification.

3. Add your custom domain to Hyphen

  1. Sign in to your Hyphen account.

  2. In the main navigation, select Settings. Under Organization, choose Domains.

  3. Click the Add Domain button.

  4. Enter your custom domain and select Next.

  5. If you haven't already add the DNS records to point to Hyphen in your domain's DNS settings, sign in to your domain registrar and follow the steps above.

  6. Once you sure the DNS record(s) have been added, click the Verify Domain button.

Your domain should be ready to use for branded short links within 5 minutes, as domain verification usually completes quickly.

4. Configure Link Not Found Redirect (Optional)

Hyphen will return a generic 404 Not Found page when a link code is not found for your domain. The “Link Not Found Redirect” setting allows you to set a custom redirect URL for your domain. Instead of serving the 404 page, Hyphen will redirect to this URL when the link code is not found. The behavior is as follows:

  • If a short link does not exist for your domain, users will be redirected to the “Link Not Found Redirect URL”, with the path sent as a query string property called “code”
https://notfoundurl.com/path/?code={code}
  • If a Link Not Found Redirect URL is not set for your domain, users will see a generic 404 Not Found page.

Setting the Link Not Found Redirect

The custom redirect URL can be set when you add your domain and/or edited after the domain’s DNS has been verified.

While adding a new domain

  1. Navigate to Settings > Domains > Add Domain in your Hyphen account.
  2. Enter a valid URL (must include http or https) in the Link Not Found Redirect field.
  3. Save your changes.

While editing an existing domain

  1. Navigate to Settings > Domains in your Hyphen account.
  2. Select the custom domain you want to configure.
  3. Click on Edit
  1. Enter a valid URL (must include http or https) in the textbox. Delete the URL if you want to remove the redirect URL and use the generic 404 Not Found page.
  2. Save your changes.

5. Configure Fallback URL (Optional)

The "Fallback URL" setting allows you to specify a template URL that Hyphen will check when a requested short link code doesn't exist in your system. This provides a seamless migration path from previous URL shortening services or enables integration with external systems.

When a user requests a short link that doesn't exist in Hyphen:

  • Hyphen will make a request to the fallback URL, replacing {code} in your template with the requested short link code
  • If the fallback URL returns a redirect, Hyphen will automatically create a new short link with the destination from the fallback service, then redirect the user to that destination.
  • If no redirect is found at the fallback URL, Hyphen will follow your configured Link Not Found Redirect behavior.

Setting the Fallback URL

The fallback URL can be configured when adding a new domain or editing an existing one.

While adding a new domain

  1. Navigate to Settings > Domains > Add Domain in your Hyphen account.
  2. Enter a valid URL template (must include http or https) in the Fallback URL field.
  3. Enter a valid URL template with the {code} tag (optional).
  4. Save your changes.

Example template: https://legacy-shortener.com/{code}

While editing an existing domain

  1. Navigate to Settings > Domains in your Hyphen account.
  2. Select the custom domain you want to configure.
  3. Click on Edit
  4. Enter a valid URL template with the {code} tag (optional).
  5. Save your changes.

📘

If you don't include the {code} tag in your fallback URL, Hyphen will automatically append it to the end of the URL.