FLAT 50% off on Update URLS, Magic Link & Logify PRO Check out the deals on our products and save big!

Advanced Features

How to Setup Custom Domains in URL Shortify

A custom domain lets you share short links on a second, shorter domain — kc.local/jazz instead of kaizencoders.com/jazz — while everything is still managed from the one WordPress site where URL Shortify is installed.

The one rule: alias, don't redirect

Your custom domain must reach WordPress as an alias, keeping its own hostname all the way through to PHP. It must not be redirected to your main domain.

This matters more than it sounds. If kc.local 301-redirects to your main domain, then by the time WordPress runs, the custom domain is gone — the visitor is on your main domain, the address bar shows your main domain, and URL Shortify has no way to tell which domain the visitor originally used. Link cloaking cannot work, and short links cannot be kept separate per domain.

Set up as an alias and the request arrives with Host: kc.local intact, which is what everything else on this page depends on.

Step 1: Point DNS at your site

Domain type Record Value
Apex — kc.local A Your site's IPv4 address
Apex — kc.local AAAA (if your host has IPv6) Your site's IPv6 address
Subdomain — go.kc.local CNAME Your main site's hostname

A CNAME is not valid at the apex of a domain. If your DNS provider offers ALIAS, ANAME or CNAME flattening (Cloudflare, Amazon Route 53 and DNSimple all do), you can use that instead of an A record.

Add www.kc.local as well if anyone is likely to type it. URL Shortify treats www.kc.local and kc.local as the same domain.

Step 2: Tell your web server to serve the domain

DNS alone is not enough. Your host also has to be told that the new domain belongs to your existing site — otherwise you will get the server's default page, a 404, or a "site not found" error.

Add it as an alias of your existing site, never as a new site:

  • cPanelDomains → Create A New Domain, or Aliases / Parked Domains, pointed at the same document root as your main site. Do not create an Addon Domain with its own folder.
  • Cloudways, Kinsta, WP Engine, SiteGround, Pressable — add it as a domain alias / additional domain on the existing application.
  • Plesk — add it as a domain alias.
  • Nginx — add the domain to server_name on your existing server block.
  • Apache — add a ServerAlias line to your existing virtual host.

Step 3: Issue an SSL certificate

Request a certificate that covers the custom domain, usually via the free Let's Encrypt option in your hosting panel. Include both kc.local and www.kc.local if you added both. Without this, https://kc.local/jazz shows a certificate warning before the redirect ever happens.

Step 4: Leave your WordPress URLs alone

Do not change Settings → General → WordPress Address or Site Address. They stay on your main domain. The custom domain is only an entry point for short links.

Step 5: Add the domain to URL Shortify

Go to URL Shortify → Domains and add the domain. Then, when creating or editing a link, pick it from the Domain dropdown on the link form.

The Domains list has a Setup column. Click Verify next to your new domain and URL Shortify will check it for you — see Verify it works below for what each result means.

By default a short link answers on every domain that reaches your site, including your main one. If your main site has a page at /jazz and you also want a short link at kc.local/jazz, the short link will shadow the page.

To stop that, turn on URL Shortify → Settings → Display Options → Restrict short links to their own domain. Each link will then only redirect on the domain assigned to it:

  • kc.local/jazz → redirects
  • kaizencoders.com/jazz/ → serves your WordPress page

Three things to know:

  • This setting requires the PRO version. Custom domains are a PRO feature, so if you are using them you already have it.
  • The link's Domain must be set to a specific domain. Links left on All my domains are unrestricted by design and keep answering everywhere.
  • This depends on the alias setup above. If your custom domain is redirected to your main domain rather than aliased, URL Shortify cannot tell the two apart, and every link assigned to that domain will stop working. The settings page shows the status of each of your domains directly above the checkbox — make sure they all read Aliased before turning it on.

Things that quietly break custom domains

Most failed setups come down to something else forcing traffic onto one domain before URL Shortify sees it:

  • "Redirect all traffic to primary domain" toggles in your hosting panel.
  • Cloudflare Page Rules or Bulk Redirects doing hostname canonicalisation.
  • SEO or security plugins with a canonical-domain redirect.
  • Leftover .htaccess or nginx rules redirecting the secondary domain — including any from earlier versions of this guide.
  • Full-page caches (Cloudflare, Varnish, LiteSpeed, WP Rocket). URL Shortify sends no-cache headers, but a cache in front of PHP can serve a stored response before the plugin ever runs. Exclude your short-link paths, or bypass the cache on the custom domain.

While testing, use a 302 redirect rather than a 301 — browsers cache a 301 more or less permanently, which makes a fixed setup look like it is still broken.

Verify it works

Go to URL Shortify → Domains and click Verify in the Setup column. URL Shortify requests a page on that domain and reports the hostname the request actually arrived on, which tells you definitively whether the domain is aliased or redirected.

Result What it means What to do
Aliased The domain reaches WordPress with its own hostname. Nothing — this is the correct setup.
Redirected Requests are being forwarded to another host, so the domain is redirected rather than aliased. Short links still work, but cloaking will not, and links cannot be restricted to this domain. Redo Step 2, and remove any redirect rules.
Not this site The domain resolves but does not reach this WordPress install. The domain is missing from your hosting panel, or points at a different document root. Redo Step 2.
Unreachable The domain could not be contacted at all. Check DNS (Step 1) and your SSL certificate (Step 3). The message names the underlying error.
Unknown Your server cannot make requests to itself, so the check could not run. Not a problem with the domain. Use the manual check below instead.
Invalid The saved value is not a usable domain name. Edit the domain and enter a plain hostname such as kc.local.
Not checked This domain has not been verified yet. Click Verify.

Checking manually

If you would rather check from your own machine, or the built-in check came back Unknown:

# DNS resolves to your server
dig +short kc.local

# The request reaches URL Shortify on the right host
curl -sI https://kc.local/jazz | grep -i 'location\|x-redirect-powered-by'

You should see an X-Redirect-Powered-By: url-shortify header alongside the Location header of your destination URL. If you get a Location pointing at your main domain instead, the domain is being redirected rather than aliased — go back to Step 2.

If you cannot alias the domain

Some hosts genuinely will not let you serve two domains from one site. In that case you can fall back to redirecting the secondary domain to your main one, but understand the trade-off: the custom domain becomes cosmetic only. Visitors land on your main domain, and Step 6 will not work.

Apache — in the .htaccess at the root of the secondary domain:

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteCond %{HTTP_HOST} ^kc\.local [OR]
  RewriteCond %{HTTP_HOST} ^www\.kc\.local
  RewriteRule (.*)$ https://www.kaizencoders.com.com/$1 [R=301,L]
</IfModule>

Nginx — in a server block for the secondary domain:

server {
  server_name kc.local www.kc.local;
  return 301 https://www.kaizencoders.com$request_uri;
}

Aliasing is the supported setup and the one we recommend. Use this fallback only when your host leaves you no other option.

FAQ

Yes. The custom domain points at the same WordPress install as an alias. Your site keeps its own address, and the short domain simply becomes a second way in.

Why does my custom domain show a page not found error?

DNS alone is not enough. The domain also has to be added to your existing site in your hosting panel, pointing at the same document root. Until that is done the server does not know the domain belongs to your site.

Yes. Both work at once. If you want a link to answer only on the custom domain, enable Restrict short links to their own domain and set the link's Domain.

Does a custom domain need its own SSL certificate?

Yes. Issue a certificate covering the custom domain, usually through the free Let's Encrypt option in your hosting panel, or visitors will see a security warning.

Can I use a subdomain instead of buying a new domain?

Yes. A subdomain such as go.yourbrand.com works the same way and only needs a CNAME record pointing at your main site.

Was this page helpful?

Previous
Browser Bookmarklet