Flat / Custom domains
Share files and websites on your own domain.
Send clients to preview.example.com or publish documents under your business domain. Keep the same address when you update the files.
Connect your domainKeep your domain with your current provider.
Use your business domain
Host your catalog at catalog.example.com or your finished website at example.com. Clients see your domain when they open the link.
Connect the domain through its DNS settings at your current provider.
How to connect a custom domain
Sign in to the CLI and replace the example domain with your own. You can also set up a domain through the API.
- 01
Configure DNS first
Add the DNS records Flat shows at your domain provider. Run inspect again to confirm the domain points to Flat before publishing.
npx -y @getflat/cli domain inspect preview.example.com - 02
Publish with your domain
Use your finished site folder or a single document such as
./catalog.pdf. Run inspect again to see the HTTPS certificate status.npx -y @getflat/cli deploy ./dist --domain preview.example.com
Keep your domain when you update
Publish revised files with the same --domain value. You can also use domain assign to point your domain at an existing upload.
Redirect www to your main domain
You can serve your site at example.com and redirect www.example.com to it. Set up DNS for both hostnames, then add the redirect through the CLI.
npx -y @getflat/cli domain redirect www.example.com example.comThe redirect keeps the path and query string, so links to individual pages still work. See the domain setup guide for details.
Custom-domain questions
Is HTTPS included?
Yes. Flat sets up an HTTPS certificate for your connected domain. Use domain inspect to check its status.
Is there a free reusable address?
Yes. A named onflat.page address is included on Free and needs no DNS setup.
Connect your domain to Flat.
Start with the DNS records shown by the CLI.