0
0
Supabasecloud~5 mins

Custom domains in Supabase

Choose your learning style9 modes available
Introduction

Custom domains let you use your own website address instead of a default one. This makes your site look professional and easier to remember.

You want your app to have a unique web address like www.myapp.com instead of a generic one.
You want to build trust with users by showing your own brand in the website address.
You want to use email addresses that match your website domain.
You want to improve your website's search engine ranking with a branded domain.
You want to redirect traffic from your domain to your Supabase app.
Syntax
Supabase
1. Buy a domain from a domain provider (like GoDaddy or Namecheap).
2. In Supabase dashboard, go to Settings > Custom Domains.
3. Add your domain name (e.g., www.myapp.com).
4. Follow instructions to add DNS records (usually CNAME or A records) at your domain provider.
5. Wait for DNS to update and verify domain in Supabase.
6. Your app will be accessible via your custom domain.

DNS changes can take some time (up to 48 hours) to fully update worldwide.

Use HTTPS by enabling SSL certificates in Supabase for secure connections.

Examples
This example shows how to add a subdomain (www) pointing to your Supabase app.
Supabase
Add domain: www.myapp.com
Add CNAME record pointing www.myapp.com to your Supabase app URL
Verify domain in Supabase dashboard
This example shows how to add a root domain (without www) using A records.
Supabase
Add domain: myapp.com
Add A records pointing myapp.com to Supabase IP addresses
Verify domain in Supabase dashboard
Sample Program

This is a step-by-step guide to connect your custom domain www.example.com to your Supabase project securely.

Supabase
1. Buy domain: example.com
2. In Supabase dashboard, go to Settings > Custom Domains
3. Add domain: www.example.com
4. At your domain provider, add CNAME record:
   Host: www
   Points to: your-project.supabase.co
5. Wait for DNS propagation
6. Verify domain in Supabase dashboard
7. Enable SSL certificate for HTTPS
8. Access your app at https://www.example.com
OutputSuccess
Important Notes

Always double-check DNS entries to avoid downtime.

Use HTTPS to protect your users and improve SEO.

Custom domains improve branding and user trust.

Summary

Custom domains let you use your own website address with Supabase.

Set up requires buying a domain and adding DNS records.

Enable SSL for secure and trusted connections.