$$$$$$\ $$\ $$$$$$$\ $$\ $$$$$$$\ $$\
$$ __$$\ $$ | $$ __$$\ \__| $$ __$$\ $$ |
$$ / \__|$$\ $$\ $$$$$$$\ $$$$$$\ $$$$$$\ $$$$$$\$$$$\ $$ | $$ | $$$$$$\ $$$$$$\ $$$$$$\$$$$\ $$\ $$$$$$$\ $$ | $$ | $$$$$$\ $$$$$$\ $$$$$$$ |$$\ $$\
$$ | $$ | $$ |$$ _____|\_$$ _| $$ __$$\ $$ _$$ _$$\ $$ | $$ |$$ __$$\ \____$$\ $$ _$$ _$$\ $$ |$$ __$$\ $$$$$$$ |$$ __$$\ \____$$\ $$ __$$ |$$ | $$ |
$$ | $$ | $$ |\$$$$$$\ $$ | $$ / $$ |$$ / $$ / $$ | $$ | $$ |$$ / $$ | $$$$$$$ |$$ / $$ / $$ |$$ |$$ | $$ | $$ __$$< $$$$$$$$ | $$$$$$$ |$$ / $$ |$$ | $$ |
$$ | $$\ $$ | $$ | \____$$\ $$ |$$\ $$ | $$ |$$ | $$ | $$ | $$ | $$ |$$ | $$ |$$ __$$ |$$ | $$ | $$ |$$ |$$ | $$ | $$ | $$ |$$ ____|$$ __$$ |$$ | $$ |$$ | $$ |
\$$$$$$ |\$$$$$$ |$$$$$$$ | \$$$$ |\$$$$$$ |$$ | $$ | $$ | $$$$$$$ |\$$$$$$ |\$$$$$$$ |$$ | $$ | $$ |$$ |$$ | $$ | $$ | $$ |\$$$$$$$\ \$$$$$$$ |\$$$$$$$ |\$$$$$$$ |
\______/ \______/ \_______/ \____/ \______/ \__| \__| \__| \_______/ \______/ \_______|\__| \__| \__|\__|\__| \__| \__| \__| \_______| \_______| \_______| \____$$ |
$$\ $$ |
\$$$$$$ |
\______/
Custom domains are a very valuable feature for enterprise clients in the Saas world. This project will help you add custom domain to your enterprise SaaS using a Vercel Proxy and a basic frontend to manage the API.
This solution is pefect for adding a custom domain on a js file or any type of files that your clients need to import in their website.
For this tutorial you'll need a Vercel account.
-
Create a new storage Edge Config.
-
Add the required env vars for the configuration-api
VERCEL_CUSTOM_DOMAIN_PROXY_EDGE_CONFIG_ID= # You can find the edge config id when you click on the storage
VERCEL_TEAM_ID= # Your vercel team id
VERCEL_PROJECT_ID= # must be the project id of the custom-domain-proxy because this is on this project that we want to add domains
AUTH_BEARER_TOKEN= # create your own bearer token that can access the projects
- Add a new domain using the configuration-api using the deployed project.
- Finish the domain configuration.
- Use the proxy with the new domain and slug you added.