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.
Practice
(1/5)
1. What is the main purpose of setting a custom domain in Supabase?
easy
A. To enable faster query execution
B. To increase database storage capacity
C. To create multiple user accounts automatically
D. To use your own website address instead of a default Supabase URL
Solution
Step 1: Understand what a custom domain is
A custom domain lets you use your own website address instead of a generic one provided by a service.
Step 2: Relate to Supabase usage
In Supabase, setting a custom domain means your app uses your own URL, making it look professional and branded.
Final Answer:
To use your own website address instead of a default Supabase URL -> Option D
Quick Check:
Custom domain = Own website address [OK]
Hint: Custom domain means your own website address [OK]
Common Mistakes:
Thinking it increases database size
Confusing with performance features
Assuming it creates user accounts
2. Which DNS record type must you add to point your custom domain to Supabase?
easy
A. CNAME record
B. MX record
C. TXT record
D. SRV record
Solution
Step 1: Identify DNS record types for domain pointing
CNAME records are used to alias one domain name to another, commonly used to point custom domains to services.
Step 2: Match with Supabase custom domain setup
Supabase requires a CNAME record to link your custom domain to their servers.
Final Answer:
CNAME record -> Option A
Quick Check:
Custom domain pointing uses CNAME [OK]
Hint: Use CNAME to point domain to Supabase [OK]
Common Mistakes:
Using MX record which is for email
Using TXT record meant for verification
Confusing SRV record with domain pointing
3. Given this Supabase custom domain setup snippet:
A. They are redirected to the Supabase database interface
B. Their browser connects to Supabase hosting for the app
C. They get an email verification prompt
D. They see a DNS error because CNAME is incorrect
Solution
Step 1: Understand CNAME effect
The CNAME record points the domain to Supabase's hosting address, so requests go there.
Step 2: Interpret user visit behavior
When visiting app.example.com, the browser connects to Supabase hosting serving the app, not the database interface or errors.
Final Answer:
Their browser connects to Supabase hosting for the app -> Option B
Quick Check:
CNAME directs browser to Supabase hosting [OK]
Hint: CNAME points domain to hosting, not email or errors [OK]
Common Mistakes:
Confusing database interface with hosting
Assuming DNS error from correct CNAME
Thinking email verification appears on visit
4. You set a custom domain in Supabase but get a security warning in browsers. What is the most likely cause?
medium
A. You did not add an MX record
B. You used an invalid domain name format
C. You forgot to enable SSL for the custom domain
D. You set the CNAME to the wrong IP address
Solution
Step 1: Identify cause of browser security warnings
Security warnings usually happen when SSL (secure connection) is missing or invalid.
Step 2: Relate to Supabase custom domain setup
Supabase requires enabling SSL for custom domains to avoid browser warnings.
Final Answer:
You forgot to enable SSL for the custom domain -> Option C
Quick Check:
Missing SSL causes browser security warnings [OK]
Hint: Always enable SSL for custom domains [OK]
Common Mistakes:
Confusing MX record with SSL
Thinking domain format causes security warning
Assuming CNAME IP address is used instead of hostname
5. You want to set up a custom domain dashboard.myapp.com for your Supabase project. Which steps must you follow to ensure it works correctly and securely?
hard
A. Buy the domain, add a CNAME DNS record pointing to Supabase, then enable SSL in Supabase settings
B. Buy the domain, add an MX record pointing to Supabase, then enable SSL in Supabase settings
C. Buy the domain, add a TXT record for verification, then disable SSL to avoid errors
D. Buy the domain, add an A record pointing to Supabase IP, then skip SSL setup
Solution
Step 1: Purchase domain and configure DNS
First, buy your domain (dashboard.myapp.com) and add a CNAME record pointing to Supabase's domain to route traffic correctly.
Step 2: Enable SSL for secure connections
Then, enable SSL in Supabase settings to secure the connection and avoid browser warnings.
Final Answer:
Buy the domain, add a CNAME DNS record pointing to Supabase, then enable SSL in Supabase settings -> Option A