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
OwnerorAdminprivileges. - A chosen custom subdomain (for example,
link.yourbrand.com).
Step-by-Step Instructions
Register Custom Domain in Shaf Dashboard
Navigate to dash.shaf.app/dashboard/settings/domains and click Add Domain.
Enter your target hostname:
link.yourbrand.comClick 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 Verificationstatus:Hostname: link.yourbrand.com Status: Pending DNS Verification Target CNAME: cname.shaf.app SSL / TLS: Pending ValidationConfigure DNS CNAME Record
Log into your DNS provider’s management console and add a CNAME record mapping your subdomain to
cname.shaf.app.- Open the Cloudflare Dashboard and select your zone.
- Go to DNS → Records → Click Add record.
- Set Type to
CNAME, Name tolink, and Target tocname.shaf.app. - Toggle Proxy status to DNS only (Grey Cloud).
- Click Save.
- Open the AWS Route 53 console and select your hosted zone.
- Click Create record.
- Enter Record name:
link. - Select Record type:
CNAME. - Enter Value:
cname.shaf.app. - Set TTL:
300seconds. Click Create records.
- Go to your Namecheap Domain List and click Manage.
- Open the Advanced DNS tab and click Add New Record.
- Select CNAME Record, set Host to
link, and Target tocname.shaf.app. - Set TTL to
Automaticand click the checkmark to save.
Add the canonical alias record to your DNS table:
Type Name / Host Target Value TTL CNAMElinkcname.shaf.app300s / Auto Verify DNS propagation from your terminal:
dig +short link.yourbrand.com CNAMEExpected output:
cname.shaf.app.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 ServicesConfigure 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.- Root Redirect (
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/welcomeExpected output:
HTTP/2 308 Permanent Redirect location: https://github.com/meladhani01/shaf cf-cache-status: HIT- Domain: Select
Next Steps
Explore advanced domain architectures and fallback policies:
Custom Domain DNS Deep Dive
Configure apex domains, CNAME flattening, and CAA security records.
Reverse Proxy Subpath Routing
Serve short links from an existing application path like yourbrand.com/l/*.
SSL & Certificate Lifecycle
Understand auto-renewal intervals and troubleshoot pending certificate validation.
Team Collaboration
Invite teammates to manage branded domains and links with role-based access control.