Skip to content

Connecting Your Branded Custom Domain

Attach a custom branded domain to your Shaf workspace with automatic TLS certificate issuance and fallback routing in 4 minutes.

Connecting Your Branded Custom Domain

Connect a custom branded domain to your Shaf workspace with automatic TLS certificate issuance and fallback routing in 4 minutes.


Prerequisites

  • Administrative access to your DNS registrar or DNS management zone (Cloudflare, AWS Route 53, Namecheap, GoDaddy).
  • A Shaf workspace with Owner or Admin privileges.
  • A chosen custom subdomain (for example, link.yourbrand.com).

Step-by-Step Instructions

  1. Register Custom Domain in Shaf Dashboard

    Navigate to dash.shaf.app/dashboard/settings/domains and click Add Domain.

    Enter your target hostname:

    link.yourbrand.com

    Click Add Domain. Shaf registers the custom hostname with Cloudflare for SaaS and exposes the required CNAME routing target.

    Expected output: The domain list displays your entry with Pending DNS Verification status:

    Hostname:       link.yourbrand.com
    Status:         Pending DNS Verification
    Target CNAME:   cname.shaf.app
    SSL / TLS:      Pending Validation
  2. Configure DNS CNAME Record

    Log into your DNS provider’s management console and add a CNAME record mapping your subdomain to cname.shaf.app.

    1. Open the Cloudflare Dashboard and select your zone.
    2. Go to DNS → Records → Click Add record.
    3. Set Type to CNAME, Name to link, and Target to cname.shaf.app.
    4. Toggle Proxy status to DNS only (Grey Cloud).
    5. Click Save.
    1. Open the AWS Route 53 console and select your hosted zone.
    2. Click Create record.
    3. Enter Record name: link.
    4. Select Record type: CNAME.
    5. Enter Value: cname.shaf.app.
    6. Set TTL: 300 seconds. Click Create records.
    1. Go to your Namecheap Domain List and click Manage.
    2. Open the Advanced DNS tab and click Add New Record.
    3. Select CNAME Record, set Host to link, and Target to cname.shaf.app.
    4. Set TTL to Automatic and click the checkmark to save.

    Add the canonical alias record to your DNS table:

    Type Name / Host Target Value TTL
    CNAME link cname.shaf.app 300s / Auto

    Verify DNS propagation from your terminal:

    dig +short link.yourbrand.com CNAME

    Expected output:

    cname.shaf.app.
  3. Verify Domain and TLS Certificate Status

    Return to dash.shaf.app/dashboard/settings/domains and click Verify DNS.

    Shaf resolves global Anycast DNS records and provisions an SSL/TLS 1.3 edge certificate via Google Trust Services or Let’s Encrypt.

    Expected output: The domain card updates to active status:

    Hostname Status:  Active
    SSL / TLS Status: Active (TLS 1.3)
    Certificate Authority: Google Trust Services
  4. Configure Root and 404 Fallback Destinations

    Click your verified domain in the list to access routing configurations:

    • Root Redirect (/): Enter your primary website URL (https://yourbrand.com).
    • 404 Not Found Redirect: Enter your fallback URL (https://yourbrand.com/help).

    Click Save Settings.

    Expected output: A verification notification appears confirming:

    Domain settings updated successfully: root redirect and 404 fallback active.
  5. Publish and Test Your First Branded Link

    Navigate to Links → click Create Link.

    • Domain: Select link.yourbrand.com.
    • Slug: welcome.
    • Destination URL: https://github.com/meladhani01/shaf.

    Click Create Link, then test the live resolution in your terminal:

    curl -I https://link.yourbrand.com/welcome

    Expected output:

    HTTP/2 308 Permanent Redirect
    location: https://github.com/meladhani01/shaf
    cf-cache-status: HIT

Next Steps

Explore advanced domain architectures and fallback policies:

Type to search…

↑↓ navigate↵ selectEsc close