link.acme.com/:slug). However, many organizations prefer hosting short links directly under a subdirectory of their primary brand website—such as acme.com/go/:slug or company.org/link/:slug./go/*) to Shaf's global edge network.| Feature | Dedicated Domain / Subdomain (link.acme.com) | Subpath Reverse Proxy (acme.com/go) |
| Domain Requirement | Requires a dedicated subdomain or root domain | Uses your existing primary website domain |
| DNS Configuration | Requires creating a CNAME record at your DNS provider | Zero DNS changes required |
| Brand Presence | Hosted on secondary host | Retains 100% brand equity on primary domain |
| Infrastructure | Directly points to Shaf edge | Reverse proxy forwards subpath traffic to Shaf |
| Authentication | DNS ownership verification | Cryptographic secret header (X-Shaf-Proxy-Secret) |
acme.com)./go or /links).spt_live_9a7f2c8d1e4b). You must include this token in your reverse proxy configuration to authenticate forwarded requests.location block inside your existing HTTPS server block:1234567891011121314151617181920212223location /go/ { # 1. Forward request to Shaf's edge gateway proxy_pass https://cname.shaf.app; # 2. Host & tenant headers proxy_set_header Host cname.shaf.app; proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # 3. Authentication secret (from your Shaf dashboard) proxy_set_header X-Shaf-Proxy-Secret "spt_live_YOUR_SECRET_TOKEN"; # 4. Mandatory TLS & SNI handshake directives proxy_ssl_name cname.shaf.app; proxy_ssl_server_name on; proxy_ssl_protocols TLSv1.2 TLSv1.3; # 5. Performance and buffering proxy_buffering off; proxy_connect_timeout 5s; proxy_read_timeout 10s; }
proxy_ssl_name cname.shaf.app; and proxy_ssl_server_name on;. If omitted, Nginx sends your domain (acme.com) in the TLS SNI handshake to Cloudflare edge, triggering an immediate SSL_ERROR_UNRECOGNIZED_NAME_ALERT connection failure./__shaf_probe) at every configured subpath.curl from your terminal against your proxy URL:1curl -i https://acme.com/go/__shaf_probe
200 OK):12345HTTP/2 200 content-type: application/json; charset=utf-8 cache-control: no-store {"status":"ok","probe":"shaf_verified"}
Pending).https://acme.com/go/__shaf_probe. Once verified, the domain badge turns Active.https://acme.com/go without specifying a link slug?https://acme.com). You can customize this target:https://acme.com/deals or https://acme.com/campaigns).| Symptom | Cause | Solution |
SSL_ERROR_UNRECOGNIZED_NAME_ALERT | Your proxy sends your domain in the SNI handshake instead of cname.shaf.app. | Ensure proxy_ssl_name cname.shaf.app; and proxy_ssl_server_name on; (Nginx) or tls_server_name cname.shaf.app (Caddy) are configured. |
401 Unauthorized | Missing or mismatched X-Shaf-Proxy-Secret header. | Verify the token in your proxy matches the Proxy Secret Token shown in the Shaf dashboard. |
404 Not Found (on existing links) | Path prefix was not stripped or was double-prefixed. | Shaf accepts both intact paths (/go/:slug) and stripped paths (/:slug). Ensure your proxy forwards the URI correctly. |
| Visitor analytics show proxy IP instead of real visitor | Missing X-Forwarded-For header. | Configure proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; in your proxy. |
Probe test fails with Probe cannot target private network | Domain resolves to localhost or private RFC 1918 IP address. | Shaf's probe engine blocks loopback and private IPs to prevent SSRF vulnerabilities. Ensure your domain resolves to a publicly routable IP address. |