Skip to main content
Using Streamstraight from your own subdomain (e.g., streamstraight.yourcompany.com) for browser requests helps avoid issues with ad blockers, firewalls, and corporate proxies that may block third-party API domains.

Why Use a Custom Domain?

  • Avoids ad blockers: Some ad blockers automatically block requests to third-party API domains
  • Firewall compatibility: Corporate firewalls may block external WebSocket connections
  • Browser security: Browsers treat same-origin requests more favorably
  • Consistent branding: Keep everything under your own domain

Setup Steps

1. Create a CNAME Record

In your DNS provider (e.g. Namecheap, Cloudflare, AWS Route 53, GoDaddy), add a CNAME record:
FieldValue
TypeCNAME
Namestreamstraight (or your preferred subdomain)
Valueapi.streamstraight.com
TTL3600 (or default)
The CNAME value must be exactly api.streamstraight.com (without https:// or trailing slashes).
This will proxy streamstraight.yourcompany.com to api.streamstraight.com.

2. Request Domain Activation

Email us at [email protected] with:
  • Your full subdomain (e.g., streamstraight.yourcompany.com)
  • Confirmation that the CNAME record has been added
We’ll activate SSL certificates for your domain, which usually takes 2-5 minutes. We’ll email you once your domain is ready.

3. Update Your Code

Once we confirm your domain is ready, update your Streamstraight client to use your custom domain.
import { connectStreamstraightClient } from "@streamstraight/client";

const client = await connectStreamstraightClient(
  {
    fetchToken: fetchStreamstraightToken,
    baseUrl: "https://streamstraight.yourcompany.com", // Your custom domain
  },
  { streamId: "your-stream-id" },
);
You’re welcome to use the new proxied subdomain for server-side requests as well, but it’s not required. The client SDK is the primary beneficiary of using the custom domain.

Troubleshooting

  • Verify the CNAME is correctly pointing to api.streamstraight.com
  • Wait a few minutes for DNS propagation
  • Ensure you’re using https:// (not http://)
  • Verify your DNS record has propagated: dig streamstraight.yourcompany.com