Skip to main content

Can I use my website domain to shorten links?

Updated over a month ago
Rebrandly

While it's possible to reroute traffic from your website domain to branded links, we highly recommend using a dedicated domain for your branded links. With a unique custom domain, there is no complicated CMS or server configuration, few possible points of failure, and no dependency on your website staying configured correctly.

If you decide that you don't want a separate domain, Rebrandly's domain alias feature lets you use the same domain for both your website and your links. Please be aware that incorrect changes could bring your website down. This is a technical process that requires the knowledge and permissions to operate on your website or CMS.

How your site works without a domain alias

Let's say your website is brandyour.link, and you only have two pages on your site, an About page and a Products page. The URLs are brandyour.link/about and brandyour.link/products.

If someone clicks a brandyour.link/products link in their browser, your server receives the request, finds the matching products page on your site, and displays it.

If someone enters brandyour.link/puppies in their browser, your server receives the request, does not find a matching page, and displays "page not found"—that's a 404 error..

How your site works with a Rebrandly domain alias

Now let's say you're sponsoring an animal adoption drive, and you want to direct people to a rescue organization's page using your own domain. This is where the branded Rebrandly link brandyour.link/puppies would be useful.

To create branded links, you first add your domain to Rebrandly—generating a domain alias—and then configure your server to use that domain alias when a page isn't found.

Once everything is configured, Rebrandly intercepts requests that would normally go to the 404 page and checks if a branded link exists. If it does, we redirect the user to the destination page—in our example, the external organization's adoption page. If it doesn't, we continue routing the user to our own 404 page.

And if a link does exist on the main website, it will have priority. Links created in Rebrandly with an alias domain will only work if they are not present on your website.

domain-alias-diagramCrop.png

Setting up a domain alias

The very first thing you'll do is log in to Rebrandly, add your domain, and copy the generated domain alias. Then, you need to configure your server.

Configuring your web server or CMS is the most complicated part of this setup. You’ll need to install a plugin or script depending on your tech stack. If you don't understand these details, get assistance from someone with the necessary technical expertise and permissions to operate on your website or CMS.

These articles explain the steps to take for your configuration:

How do I set up an alias to shorten links with my website domain? (Includes NGINX, IIS, client-side Javascript, PHP, .NET core, and FLASK.)

Did this answer your question?