Leon4gr45/builder
0
1# Custom Domains2 3## Setup (2 steps)4 51. In OSW Studio, go to Deployment Settings and enter your domain (e.g., `sweetcandies.com`)62. In your DNS provider, add an A record pointing to your OSW Studio server's IP address7 8That's it. The server handles SSL certificates automatically via Let's Encrypt.9 10## How It Works11 12When you publish a deployment with a custom domain:13 141. OSW Studio registers the domain in its routing table152. The reverse proxy (Caddy) intercepts requests to your domain163. Caddy provisions an SSL certificate automatically (on-demand TLS)174. Requests are routed to your deployment's static files185. `/api/` paths (edge functions, analytics) pass through without rewriting19 20## What OSW Studio Handles21 22- Domain registration in the routing table23- Root-relative asset paths when a custom domain is set24- SEO meta tags, sitemaps, and canonical URLs using your domain25- Analytics origin validation for your domain26 27## What OSW Studio Does Not Handle28 29- DNS configuration (you add the A record)30- SSL certificates (Caddy handles this automatically)31- Domain purchase or registration32 33## For Self-Hosted Instances34 35Your OSW Studio instance needs a reverse proxy with TLS support. See `docs/SELF_HOSTED_DOMAINS.md` for API endpoints and proxy requirements.36 37## For Hosted Instances (oswstudio.com)38 39Custom domains are handled automatically by the platform. Just add your DNS A record.40 41## Troubleshooting42 43**Site not loading after adding DNS**44- DNS propagation can take up to 48 hours (usually minutes)45- Verify your A record: `dig sweetcandies.com` should show the server IP46- The first request may take a few seconds while the SSL certificate is provisioned47 48**SSL certificate not working**49- Ensure your DNS A record points directly to the server IP (not through a proxy)50- Caddy needs port 80 and 443 open for Let's Encrypt HTTP-01 challenges51 52**Assets loading from wrong path**53- Republish your deployment after setting the custom domain54- The asset path rewriting only takes effect on publish55 