# How to set up domain mapping in Bubble

- Tool: Bubble
- Difficulty: Beginner
- Time required: 15-20 min
- Compatibility: Starter plan+ (custom domains require paid plans)
- Last updated: March 2026

## TL;DR

Domain mapping in Bubble connects your custom domain to your Bubble app through DNS configuration. This tutorial covers both subdomain and root domain setup, configuring DNS records at your registrar, handling SSL certificates, troubleshooting common DNS errors, and maintaining email functionality alongside your Bubble app.

## Overview: Domain Mapping in Bubble

This tutorial walks you through connecting a custom domain to your Bubble app. You will learn the difference between subdomain and root domain setups, configure the correct DNS records, handle SSL certificate provisioning, and troubleshoot common issues like DNS propagation delays and SSL errors. The guide also covers preserving your email setup when pointing your domain to Bubble.

## Before you start

- A Bubble app on a paid plan (Starter or higher)
- A registered domain name from a domain registrar (GoDaddy, Namecheap, Google Domains, etc.)
- Access to your domain registrar's DNS management panel
- Your app deployed to at least the Development version in Bubble

## Step-by-step guide

### 1. Add your custom domain in Bubble settings

In the Bubble editor, go to Settings in the left sidebar, then click the Domain / email tab. In the Domain section, enter your custom domain (like www.yourapp.com or app.yourapp.com). Click Add domain. Bubble will display the DNS records you need to configure at your registrar. Copy these values — you will need them in the next step. For a root domain (yourapp.com without www), Bubble provides A record IP addresses. For a subdomain (www.yourapp.com or app.yourapp.com), Bubble provides a CNAME target.

> Pro tip: It is easier to use a subdomain (www or app) because CNAME records are simpler to configure and more flexible than A records required for root domains.

**Expected result:** Your custom domain is added in Bubble settings with DNS record values displayed for configuration.

### 2. Configure DNS records at your domain registrar

Log in to your domain registrar (GoDaddy, Namecheap, Cloudflare, etc.) and navigate to DNS settings for your domain. For a subdomain like www.yourapp.com: add a CNAME record with Host set to 'www' and Value set to the CNAME target Bubble provided. For a root domain (yourapp.com): add the A records Bubble provided, each pointing to the specified IP address. If you want both root and www to work, set up the root domain A records and add a CNAME for www pointing to the root domain. Set TTL to the lowest available value (300 seconds) to speed up propagation.

**Expected result:** DNS records are configured at your registrar, pointing your domain to Bubble's servers.

### 3. Wait for DNS propagation and verify the connection

DNS changes can take 15 minutes to 48 hours to propagate worldwide, though most resolve within 1-2 hours. Go back to Bubble's Settings → Domain tab and click Check DNS or refresh the page. Bubble will indicate whether it can see your DNS records. You can also verify independently using a tool like dnschecker.org — enter your domain and check that the A or CNAME records point to the correct values. If propagation is slow, try flushing your local DNS cache or testing from a different network.

> Pro tip: Use dnschecker.org to check propagation status worldwide — it shows which DNS servers have updated and which are still pending.

**Expected result:** Bubble confirms that your DNS records are correctly configured and points to the right servers.

### 4. Verify SSL certificate provisioning

Once DNS is verified, Bubble automatically provisions an SSL certificate for your custom domain using Let's Encrypt. This can take a few minutes to a few hours. Check by visiting your domain in a browser — you should see the padlock icon indicating HTTPS is active. If you see SSL errors like ERR_CERT_INVALID or SSL_ERROR_BAD_CERT_DOMAIN, wait 30 minutes and try again. If the error persists, check that you do not have Cloudflare proxy mode (orange cloud) enabled — it can interfere with Bubble's SSL provisioning. Use DNS only mode (grey cloud) in Cloudflare.

**Expected result:** Your custom domain loads with a valid SSL certificate and the padlock icon appears in the browser.

### 5. Preserve email DNS records when mapping your domain

If you use email on your domain (like hello@yourapp.com), changing DNS records can break email delivery. Before making changes, note down your existing MX records, SPF records (TXT records starting with v=spf1), DKIM records, and any other email-related DNS entries. After adding Bubble's DNS records, verify that your MX and email TXT records are still intact. If your registrar requires you to replace existing records, make sure to add the email records back alongside the new Bubble records. Test email delivery by sending and receiving a test message.

**Expected result:** Your custom domain works with Bubble and your email service continues to function without disruption.

### 6. Set up a redirect from root to www (or vice versa)

If you want yourapp.com to redirect to www.yourapp.com (or the reverse), you need to configure this at the DNS or registrar level since Bubble does not handle automatic redirects between root and www. Most registrars offer URL forwarding or redirect features. Set up a 301 (permanent) redirect from the non-primary version to the primary one. If using Cloudflare, create a Page Rule that redirects yourapp.com/* to https://www.yourapp.com/$1 with a 301 status. This ensures users always land on the correct version and search engines do not see duplicate content.

**Expected result:** Visiting the non-primary domain version automatically redirects to the primary one with a 301 redirect.

## Complete code example

File: `Workflow summary`

```text
DOMAIN MAPPING CONFIGURATION SUMMARY
=====================================

BUBBLE SETTINGS:
  Settings → Domain / email → Add domain
  Enter: www.yourapp.com (or app.yourapp.com)

DNS RECORDS — SUBDOMAIN (www or app):
  Type: CNAME
  Host: www (or app)
  Value: [Bubble-provided CNAME target]
  TTL: 300

DNS RECORDS — ROOT DOMAIN (yourapp.com):
  Type: A
  Host: @ (or blank)
  Value: [Bubble IP address 1]
  TTL: 300

  Type: A
  Host: @ (or blank)
  Value: [Bubble IP address 2]
  TTL: 300

BOTH ROOT AND WWW:
  A records for @ → Bubble IPs
  CNAME for www → yourapp.com (or Bubble target)
  Plus redirect from one to the other

EMAIL PRESERVATION:
  Keep existing records:
    MX records (email routing)
    TXT records (SPF: v=spf1...)
    CNAME records (DKIM)
  These coexist with Bubble A/CNAME records

SSL CERTIFICATE:
  Automatic via Let's Encrypt
  Provisioning time: minutes to hours
  Troubleshooting:
    - Wait 30 min for propagation
    - Disable Cloudflare proxy (use grey cloud)
    - Check DNS records are correct

REDIRECT SETUP:
  Option A: Registrar URL forwarding
    yourapp.com → https://www.yourapp.com (301)
  Option B: Cloudflare Page Rule
    yourapp.com/* → https://www.yourapp.com/$1 (301)

VERIFICATION TOOLS:
  dnschecker.org — check global DNS propagation
  Browser padlock icon — verify SSL is active
  Bubble Settings → Domain tab → Check DNS
```

## Common mistakes

- **Enabling Cloudflare proxy mode (orange cloud) on the Bubble domain** — Cloudflare's proxy intercepts SSL connections and conflicts with Bubble's Let's Encrypt certificate provisioning, causing SSL errors Fix: Set the DNS record to DNS only mode (grey cloud icon) in Cloudflare for your Bubble domain
- **Deleting email MX records when adding Bubble DNS entries** — MX records control email routing — removing them stops email delivery to your domain entirely Fix: Before making any DNS changes, document all existing email-related records (MX, SPF, DKIM) and ensure they remain after adding Bubble records
- **Not waiting long enough for DNS propagation** — DNS changes can take up to 48 hours to propagate globally — checking too early shows errors that resolve on their own Fix: Wait at least 1-2 hours before troubleshooting, and use dnschecker.org to monitor propagation progress

## Best practices

- Use a subdomain (www or app) rather than a root domain for simpler DNS configuration
- Set DNS TTL to the lowest available value (300 seconds) before making changes for faster propagation
- Document all existing DNS records before making any changes
- Verify email functionality after DNS changes by sending a test email
- Use DNS only mode in Cloudflare to avoid SSL conflicts with Bubble
- Set up a 301 redirect between root and www to prevent duplicate content issues
- Check dnschecker.org before contacting support — most issues are propagation delays

## Frequently asked questions

### Can I use a custom domain on Bubble's free plan?

No. Custom domains require a paid Bubble plan (Starter or higher). On the free plan, your app is accessible only at yourapp.bubbleapps.io.

### How long does DNS propagation take?

Most DNS changes propagate within 1-2 hours, but full global propagation can take up to 48 hours. Set your TTL to the lowest value to speed this up.

### Why am I getting SSL errors on my custom domain?

The most common cause is Cloudflare proxy mode interfering with Bubble's SSL provisioning. Set the DNS record to DNS only (grey cloud) in Cloudflare. Also ensure DNS has fully propagated — wait at least 30 minutes after setup.

### Can I use multiple custom domains with one Bubble app?

Bubble supports one primary custom domain per app. For multiple domains, you can set up 301 redirects from additional domains to your primary domain at the DNS or registrar level.

### Will domain mapping break my email?

It can if you accidentally delete MX or email TXT records. Always preserve existing email DNS records (MX, SPF, DKIM) when adding Bubble's A or CNAME records.

### Can RapidDev help with domain setup and DNS configuration?

Yes. RapidDev can handle the complete domain mapping process including DNS configuration, SSL verification, email preservation, and redirect setup for your Bubble app.

---

Source: https://www.rapidevelopers.com/bubble-tutorial/accomplish-domain-mapping-in-bubble
© RapidDev — https://www.rapidevelopers.com/bubble-tutorial/accomplish-domain-mapping-in-bubble
