> For the complete documentation index, see [llms.txt](https://manual.bubble.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://manual.bubble.io/help-guides/getting-started/navigating-the-bubble-editor/tabs-and-sections/settings-tab/web-app/custom-domain-and-dns.md).

# Custom domain and DNS

When an app is created, Bubble uses the name you provide to generate a unique URL where you can run [both the development and live branches](#user-content-fn-1)[^1] of your app. For example, if your app has the name `my-bubble-application`, Bubble generates the URLs below:

{% tabs %}
{% tab title="Live" %}

```url
https://my-bubble-application.bubbleapps.io
```

{% endtab %}

{% tab title="Development" %}

```url
https://my-bubble-application.bubbleapps.io/version-test/
```

{% endtab %}
{% endtabs %}

### What does it mean to connect to a custom domain?

{% hint style="info" %}
Each app can only be connected to **one** domain or subdomain. If you need to use multiple domains or subdomains, consider using the sub-app feature.

**Article:** [Sub-apps](/help-guides/optimizing-an-application/sub-apps.md)
{% endhint %}

Setting up a custom domain means configuring your app so it's reached through a domain name you've chosen, instead of the default address Bubble provides. This involves registering a domain name (like `www.my-custom-domain.com`) and then linking it to your app. The domain then becomes the root of all your app's URLs.

{% tabs %}
{% tab title="Live" %}

```url
https://www.my-custom-domain.com
```

{% endtab %}

{% tab title="Development" %}
{% code overflow="wrap" %}

```url
https://www.my-custom-domain.com/version-test/
```

{% endcode %}
{% endtab %}
{% endtabs %}

A custom domain makes your app's URL more recognizable and professional, and lets it reflect your brand or your app's purpose.

### Quick guide: setting up a custom domain

Setting up a custom domain takes three steps:

{% stepper %}
{% step %}

#### Register the domain

The first step is to buy the domain you want from a registrar[^2].
{% endstep %}

{% step %}

#### Add the domain in Bubble

Then, you add that domain, such as `www.example.com`, in the Bubble editor.
{% endstep %}

{% step %}

#### Change DNS settings

Bubble then shows you the DNS records to add at your registrar. In most cases, that's a single CNAME record pointing to `app.bubble.io`.
{% endstep %}
{% endstepper %}

#### `example.com` versus `www.example.com`

Most apps and websites are expected to load whether the user types `example.com` or `www.example.com`. For SEO purposes, Bubble automatically redirects one to the other, depending on which one you entered as your app's custom domain.

For example:

| Your custom URL   | User types                | Redirects to              |
| ----------------- | ------------------------- | ------------------------- |
| `example.com`     | `https://www.example.com` | `https://example.com`     |
| `www.example.com` | `https://example.com`     | `https://www.example.com` |

### In-depth guide: setting up a custom domain

{% hint style="info" %}
Many registrars also offer hosting, meaning they'll show you a price for the domain and for a hosting period, typically a year or more. Since Bubble apps are hosted on Bubble's servers, you don't need to buy hosting as well. Make sure you only pay for the domain.
{% endhint %}

{% hint style="warning" %}
You can't use a custom domain that includes the term `bubble`, such as `www.bubbleagency.com`, since it violates our terms of service.

Page: [Terms of service](https://bubble.io/terms)
{% endhint %}

#### Step 1: Register the domain

Domains are bought from a company known as a domain registrar. Once you've bought a domain, it's your unique identifier on the web, and no one else can register the same one. Many domains are registered for the first time, but there's also a market for existing domains, with prices ranging from a few US dollars to several million.

<details>

<summary>Domain registrars</summary>

Registrars are accredited companies that manage the reservation of domain names. There are many providers, and the list below includes some of the biggest:

1. GoDaddy - [https://www.godaddy.com](https://www.godaddy.com/)
2. Namecheap - [https://www.namecheap.com](https://www.namecheap.com/)
3. Cloudflare - [https://www.cloudflare.com/products/registrar](https://www.cloudflare.com/products/registrar/)
4. Squarespace Domains - [https://domains.squarespace.com](https://domains.squarespace.com/)
5. Bluehost - [https://www.bluehost.com](https://www.bluehost.com/)
6. HostGator - [https://www.hostgator.com](https://www.hostgator.com/)
7. DreamHost - [https://www.dreamhost.com](https://www.dreamhost.com/)
8. IONOS - [https://www.ionos.com](https://www.ionos.com/)
9. Network Solutions - [https://www.networksolutions.com](https://www.networksolutions.com/)
10. Dynadot - [https://www.dynadot.com](https://www.dynadot.com/)

*<mark style="color:red;">Bubble is not responsible for the content, accuracy, or practices of third-party websites or services that are linked from our platform and website. We provide these links for your convenience. Always review the terms and conditions and privacy policies of any third-party websites or services that you visit.</mark>*

</details>

Users reach your app by typing its domain into their browser's address bar. Think of it as the digital equivalent of your physical address: it's how people find you on the internet.

#### Step 2: Add the domain in Bubble

It doesn't matter which registrar you use, as long as you can make changes to the [domain's DNS settings](#user-content-fn-3)[^3].

To set up the domain with your app:

{% stepper %}
{% step %}

#### Open domain settings

Go to the **Settings** tab and open the **Domain and email** section.
{% endstep %}

{% step %}

#### Enter the name

Enter the domain you bought in step 1 in the *Domain name* field.
{% endstep %}

{% step %}

#### Confirm

Click **Set up this domain**.
{% endstep %}
{% endstepper %}

When you've completed these steps, Bubble shows you the DNS records you need for step 3. For a root domain like `example.com`, they look like this:

| Type           | Name    | Value           |
| -------------- | ------- | --------------- |
| CNAME or ALIAS | (empty) | `app.bubble.io` |
| CNAME          | `www`   | `app.bubble.io` |

{% hint style="info" %}
Always use the records shown in the **Domain and email** section of your app. They depend on the domain you entered, so a subdomain, for example, gets different records than a root domain.
{% endhint %}

<details>

<summary>What are CNAME and ALIAS records?</summary>

A **CNAME record** (canonical name record) points one domain name to another. Instead of telling the internet the exact address of a server, it says "this domain lives wherever `app.bubble.io` lives." If Bubble's servers ever change, your domain keeps working, because it follows `app.bubble.io` instead of a fixed address.

An **ALIAS record** does the same job for your root domain, like `example.com`. For technical reasons, the DNS standard doesn't allow a regular CNAME record on a root domain. Some registrars, like Cloudflare, accept a CNAME there anyway and handle it behind the scenes, while others offer an ALIAS record instead. Some registrars call it something else, such as an ANAME record or CNAME flattening.

</details>

<details>

<summary>Why are there two records?</summary>

One record is for your root domain (the empty name, like `example.com`), and the other is for `www` (like `www.example.com`). Adding both means your app loads whichever version a user types, and Bubble then redirects them to the version you entered as your custom domain.

</details>

{% hint style="info" %}
**Set up with A records?** Apps that were connected to a custom domain using A records keep working as before. You don't need to change anything.
{% endhint %}

#### Step 3: Change the DNS settings

{% hint style="info" %}
This part can get a bit technical, since every registrar's interface is different. If you need help, contact your registrar's customer support. You can also ask on the [forum](https://forum.bubble.io/), where there's a good chance another user has worked with the same registrar.
{% endhint %}

Once you have the DNS records, you're done in Bubble. The next steps happen in the dashboard of the registrar where your domain is managed.

{% stepper %}
{% step %}

#### Log in to the registrar's dashboard

These steps happen in your registrar's dashboard, not in Bubble.
{% endstep %}

{% step %}

#### Go to the DNS settings

Look for *DNS settings*, *DNS records*, or *DNS zone file* in your registrar's dashboard.
{% endstep %}

{% step %}

#### Remove conflicting records

Remove any existing A, AAAA, or CNAME records with an empty name or the name `www`. These can conflict with the new records. Note that [some registrars use `@` instead of an empty name](#user-content-fn-4)[^4] for the root domain.
{% endstep %}

{% step %}

#### Add the records Bubble provided

Add the records shown in the **Domain and email** section of your app. For the root domain, use a CNAME record if your registrar allows it. If it doesn't, use an ALIAS record instead.
{% endstep %}
{% endstepper %}

#### Propagating the changes

After you add the DNS records, the new settings need to spread across the internet. This is called *propagation*, and **it can take up to 24 hours**. With CNAME records, it's often much faster, sometimes just a few minutes.

Wait a few minutes before you check your settings. Until the records have propagated, your domain may show errors. If your DNS is managed by Cloudflare, you may briefly see Cloudflare error 1014, which goes away on its own.

{% hint style="info" %}
After the DNS records are in place, setting up HTTPS for your domain can take up to 24–36 hours. Avoid deleting the domain in Bubble during this time, since that can cause further delays.
{% endhint %}

<details>

<summary>Why do DNS settings need time to propagate?</summary>

DNS stands for Domain Name System, which is essentially the phone book of the internet. It translates human-friendly domain names like `bubble.io` into the IP addresses that computers use to communicate with each other.

To keep this fast, DNS information isn't fetched fresh every time someone visits a site. Networks, internet providers, and even your own device store cached copies of recent lookups. When you type a domain into your browser, your computer usually checks one of these caches before reaching out across the internet.

When you update your DNS settings, the change needs to reach all those cached copies. This is what's known as *propagation*.

Since the cached copies refresh at different intervals, it takes time for all of them to catch up. That's why you might not see your app right away after changing its DNS settings, and why a friend in another country may see the change sooner or later than you.

Propagation depends on your registrar and the DNS servers involved, and Bubble can't speed it up.

</details>

### Checking the DNS settings

Below the DNS records, you can check whether everything is set up correctly by clicking **Check my settings**. If you get an error, the records may not be set up correctly, or the changes may not have propagated yet. See the FAQ below for solutions to common errors.

<figure><img src="https://34394582-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M5sbzwG7CljeZdkntrL%2Fuploads%2FUbl9X0GYRept2DGTjRrl%2Fcheck-dns-settings%402x.png?alt=media&#x26;token=e17f7e61-bf67-4378-971d-dc643ee9e111" alt=""><figcaption></figcaption></figure>

As soon as your domain is set up correctly, all requests to `yourapp.bubbleapps.io` are automatically redirected to `yourdomain.com`. This applies to both the live and development versions of your app.

### Setting up a subdomain

<details>

<summary>What is a subdomain?</summary>

Imagine a website as an office building, with the domain name as the building's address. A subdomain is like a specific department within that building, with its own identifier.

In more technical terms, a domain is the main web address you use to reach a website (like `bubble.io`). A subdomain is an extra part added to the front of the domain, separated by a dot. For example, `support.yourapp.com` could be the subdomain for the customer support section of your main app at `yourapp.com`.

This lets you organize different parts of your app, like separate areas for blog posts, customer support, legal documents, and product pages, while staying connected to the main domain.

</details>

If you already use a domain and want a subdomain to point to your Bubble app, such as `app.yourapp.com`, the steps are mostly the same as above, with a few differences:

{% stepper %}
{% step %}

#### Register the domain

When you buy a domain, you can create subdomains within it, and you don't need to buy them separately.

Subdomains, like `blog.example.com` or `shop.example.com`, are part of the main domain (`example.com`) and are set up directly in your registrar's dashboard.
{% endstep %}

{% step %}

#### Add the domain in Bubble

Instead of the main domain, such as `www.example.com`, enter the full subdomain, such as `app.example.com` or `dashboard.example.com`.
{% endstep %}

{% step %}

#### Change the DNS settings

Bubble shows you the DNS record to add at your registrar. For a subdomain, it's a single CNAME record, with the subdomain as the name (such as `app`) and `app.bubble.io` as the value. Add it the same way as described above.
{% endstep %}
{% endstepper %}

### Changing or removing a domain

To change your domain, you first need to remove the current one. Click **delete this domain name** to disconnect the domain from your app.

Your domain still points to Bubble until you remove the DNS records at your registrar. Until then, visitors see a Bubble page saying there's no app connected to the domain. Once you've removed the domain, you can add a new one as described above.

{% hint style="info" %}
**Browser cache:** If you remove a domain and go back to using your `appname.bubbleapps.io` URL, you may need to clear your browser cache, since browsers often cache the redirect.
{% endhint %}

#### Will a domain change affect uploaded file URLs and dynamic URL expressions?

In short, no.

* **Uploaded files** are stored on S3, not on your domain. Their URLs stay the same whether you set, change, or remove a custom domain.
* **URL expressions** automatically update to reflect your app's current domain. However, if you've typed your app's domain in anywhere, you'll need to update it. We recommend using the `This URL` or `Website home URL` data sources instead of typing in a domain, so it stays consistent.

### SSL encryption (HTTPS)

{% hint style="info" %}
For all apps created after **October 2019**, TLS is mandatory, and this setting can't be changed.
{% endhint %}

TLS and SSL are encryption protocols that keep data secure while it's sent between systems. All apps hosted on Bubble use TLS automatically, and it can't be turned off.

This means any data traveling between the user's device and Bubble's servers, along with related services, is encrypted in transit. Even if a third party intercepted it, they couldn't read the contents.

<details>

<summary>What are TLS and SSL?</summary>

*TLS (Transport Layer Security)* and *SSL (Secure Sockets Layer)* are protocols that encrypt communication over a network, such as between Bubble's servers and the devices of you and your users.

TLS is the newer version of SSL and offers stronger security, but the term SSL is still often used to mean TLS in everyday language. SSL itself is considered outdated today, and Bubble uses TLS for all connections.

This encryption applies to both your app and the Bubble editor, keeping data secure while it's in transit between the server and the device.

</details>

### FAQ: Domain and DNS

<details>

<summary>What is a custom domain?</summary>

A custom domain is your own web address, such as `yourapp.com`, used instead of Bubble's default `yourappname.bubbleapps.io` URL. A custom domain gives your app a professional, branded appearance.

</details>

<details>

<summary>Do I need a paid plan to use a custom domain?</summary>

Yes. Custom domains are available on Bubble's paid plans. The Free plan uses the default `bubbleapps.io` subdomain only. See the [pricing page](https://bubble.io/pricing) for current plan details.

</details>

<details>

<summary>Do I have to buy a domain through Bubble?</summary>

No. You buy the domain separately from a registrar, such as GoDaddy, Namecheap, or Cloudflare, then point it to Bubble through its DNS settings.

</details>

<details>

<summary>Where do I set up my custom domain in Bubble?</summary>

In the **Domain and email** section of the **Settings** tab. Enter your domain name there and follow the instructions to connect it. This article explains it: scroll to the top.

</details>

<details>

<summary>What DNS records do I need?</summary>

In most cases, a CNAME record pointing to `app.bubble.io`. For a root domain like `example.com`, you add one record for the root domain and one for `www`. If your registrar doesn't allow a CNAME record on the root domain, use an ALIAS record instead. The exact records for your domain are shown in the **Domain and email** section of the **Settings** tab.

</details>

<details>

<summary>My domain was set up with A records. Do I need to change anything?</summary>

No. Apps that were connected to a custom domain using A records keep working as before.

</details>

<details>

<summary>How long does it take for a custom domain to start working?</summary>

DNS changes can take up to 24 hours to propagate, but with CNAME records, it's often a matter of minutes. Setting up HTTPS can take up to 24–36 hours. The timing can also vary based on your device, network, and location.

</details>

<details>

<summary>Why does DNS propagation take time?</summary>

Networks, internet providers, and devices store cached copies of recent DNS lookups to make domain lookups fast. When you change your DNS settings, the new information has to wait for those cached copies to expire before it's picked up. That's what causes the delay.

DNS propagation is handled by third parties and is outside of Bubble's control.

</details>

<details>

<summary>Does Bubble provide an SSL certificate?</summary>

Yes. Bubble automatically issues and renews an SSL certificate for your custom domain, so your app is served over HTTPS without any setup on your part.

</details>

<details>

<summary>Why are my users getting "This Connection is Not Secure" errors?</summary>

Cloudflare hasn't validated your domain yet.

If you click **Advanced** and look at the certificate details, and the certificate has a name like `ssl123456.cloudflare.net`, your DNS record is pointing to the right place, but Cloudflare hasn't validated your domain yet. Wait an hour and check again.

</details>

<details>

<summary>How long does it take for my domain to move to Cloudflare?</summary>

From a couple of minutes to several hours, depending on how long your DNS records take to update.

When you set up your custom domain in Bubble, your domain is registered with both Bubble and Cloudflare. For it to work correctly, Cloudflare needs to validate that your DNS records point to Bubble.

When you update your DNS records by adding, removing, or renaming a record, how long the old version stays around is determined by the record's **TTL** (time to live) value.

Say you change a record at your registrar, and that record has a TTL of one hour. After one hour, you can be sure that **that** server is sharing your new record. However, there are many name servers on the internet, and all of them need your latest record. **On average**, you can expect your records to reach the whole internet within twice the length of your TTL. So if your TTL is one hour, expect your record to be everywhere after two hours.

Once your record has been updated everywhere, Cloudflare can verify that you own the domain, and your app becomes active.

</details>

<details>

<summary>How do I know my domain is working?</summary>

There are several tools you can use.

To check whether your DNS records have propagated, use the [Google DNS lookup tool](https://toolbox.googleapps.com/apps/dig/). Enter your domain and open the **CNAME** tab. If the record has propagated, you'll see your domain pointing to `app.bubble.io`:

```
www.mywebpage.us. 299 IN CNAME app.bubble.io.
```

If you used an ALIAS record, or a CNAME on a registrar that handles root domains behind the scenes, the lookup may show A records instead of a CNAME record for your root domain. That's expected.

You can also use a service like [What's my DNS](https://www.whatsmydns.net), which tests your domain from many locations around the world. It's not unusual to see a few blank entries. What you're looking for is any results that show an error (a red X) or values you didn't expect.

Cloudflare also serves a page at the `/cdn-cgi/trace` route on every site it hosts. You can see Bubble's at [bubble.io/cdn-cgi/trace](http://bubble.io/cdn-cgi/trace). Replace `bubble.io` with your own custom domain, once it loads, to check that it's working.

The output should look something like this:

```
fl=xxxxx
h=bubble.io
ip=xxx.xxx.xxx.xxx
ts=1572657558.41
visit_scheme=http
uag=Mozilla/5.0 [...]
colo=EWR
http=http/1.1
loc=US
tls=off
sni=off
warp=off
```

</details>

<details>

<summary>I am a legacy customer. How do I temporarily disable Cloudflare?</summary>

If you're having problems you think might be caused by Cloudflare, you can temporarily disable it by changing your DNS records back to the A record you were originally assigned.

When you've found the problem and are ready to turn Cloudflare back on, delete that A record and replace it with the records Bubble provides in the **Domain and email** section.

</details>

<details>

<summary>Can I use a subdomain instead of a root domain?</summary>

Yes. You can connect a subdomain such as `app.yourapp.com` or `dashboard.yourapp.com`. It needs a single CNAME record, which Bubble shows you in the **Domain and email** section of the **Settings** tab.

</details>

<details>

<summary>I'm getting 1001 errors.</summary>

Check your DNS records, wait two hours, and check again.

Cloudflare has to verify that your DNS records point to Bubble. If you're sure your records are correct, Cloudflare keeps re-checking them for several days, starting at one-minute intervals and increasing to a maximum of two hours between checks. If your site is still showing 1001 errors after two hours, go to Bubble, delete your custom domain, wait one minute, and set it up again.

</details>

<details>

<summary>I'm getting 1014 errors.</summary>

If you've just added your DNS records, wait a few minutes. When your DNS is managed by Cloudflare, error 1014 often shows up briefly while your domain is being set up, and it goes away on its own.

If the error doesn't go away, check whether proxying is turned on. The most common cause of lasting 1014 errors is using Cloudflare for DNS with the "orange cloud" (proxy) setting turned on. Click the orange cloud to turn off proxying, so it turns grey.

</details>

<details>

<summary>I'm getting 525 errors on my site.</summary>

Wait an hour and check again.

If you're a legacy customer who wasn't using SSL before switching to Cloudflare, some of Bubble's servers may not have your updated certificate yet. A 525 error happens when the origin server, where your app is hosted on Bubble, serves non-secure content (HTTP) to a server that expects secure content (HTTPS).

We refresh SSL certificate settings on all servers once an hour, so if you've recently changed your settings, wait and try again.

</details>

<details>

<summary>I've followed all the instructions here, and I still get "This Connection is Not Secure."</summary>

We may not be able to issue an SSL certificate for your domain. If so, you'll need to remove your CAA record and try again.

Go to the Google DNS lookup tool's [CAA tab](https://toolbox.googleapps.com/apps/dig/#CAA/) and check whether your root domain (for example, `example.com`) has a CAA record. A CAA record limits which certificate providers can issue certificates for your domain. Only about 1% of Bubble apps have one.

For example, when you look up `google.com` with this tool, you can see the following record:

```
id 61662
opcode QUERY
rcode NOERROR
flags QR RD RA
;QUESTION
google.com. IN CAA
;ANSWER
google.com. 21599 IN CAA 0 issue "pki.goog"
;AUTHORITY
;ADDITIONAL
```

This means that *only* `pki.goog` is allowed to issue certificates for sites on the `google.com` domain.

Issuing an SSL certificate is a critical part of making your site work on Bubble and Cloudflare, so if you find a CAA record, delete it. Your site should start working within minutes.

</details>

<details>

<summary>Can I use multiple custom domains with the same app?</summary>

Each Bubble app supports one custom domain. To use more domains, you can use sub-apps, or set up redirects through your registrar or DNS provider.

</details>

<details>

<summary>What happens to the default bubbleapps.io URL after I set up a custom domain?</summary>

It keeps working, but redirects to your custom domain. Anyone visiting `yourapp.bubbleapps.io` is sent to your custom domain automatically.

</details>

<details>

<summary>Can I send emails from my custom domain?</summary>

Yes. Once a custom domain is set up, you can set up email sender addresses in the **Domain and email** section of the **Settings** tab. Your app can then send emails from addresses such as `support@yourdomain.com` instead of the default Bubble address.

</details>

<details>

<summary>What if my domain isn't working after I set it up?</summary>

Common causes include DNS records that haven't propagated yet, incorrect values, or conflicting records left over from a previous setup, such as an old A record with the same name. A tool like [dnschecker.org](https://dnschecker.org) can help you confirm that your records point to the right values. If the issue continues, contact your registrar or Bubble's Success team.

</details>

<details>

<summary>Can I change or remove my custom domain later?</summary>

Yes. You can change or remove your custom domain at any time in the **Domain and email** section of the **Settings** tab. Changes take effect once the DNS updates have propagated.

</details>

## Other ways to learn

<details>

<summary>Video lessons</summary>

* [How to set up a custom domain](https://www.youtube.com/watch?v=vGk6nfq41L4)

</details>

<details>

<summary>Relevant articles</summary>

[What is a RESTful API?](/help-guides/integrations/api/introduction-to-apis/what-is-a-restful-api.md)

Since the loading of a web page is technically one or more API calls between the server and device, this section on APIs covers the technical basics of what's going on in during a requests and response.

</details>

[^1]: In Bubble, you can run your app in two separate environments: development and live.

    The development environment is a sandbox where you can make changes and preview your app without affecting the live version.

    The live environment is what your end-users interact with.

    Each environment has its own separate database, so development data doesn't mix with live data.

    For teams working together, Bubble also lets you create more branches.

    Learn more in the following article:

    Article series: Version control

[^2]: A registrar is a company accredited by the Internet Corporation for Assigned Names and Numbers (ICANN), or by a national country code top-level domain (ccTLD) authority, to register and manage domain names.

    Registrars let the public buy and register domain names.

[^3]: DNS is like a phone book for the internet. It translates the website names we humans understand, like `www.bubble.io`, into the numbers (called IP addresses) that computers understand, so your computer can find and connect to the right website.\
    \
    This is how your users' browsers find their way to Bubble's servers when they type in your app's URL.\
    \
    At your registrar, the DNS settings tell the internet that your domain should lead to your Bubble app.

[^4]: This means the `@` symbol is used instead of an empty name to refer to the root domain.

    For example:\
    Name: (empty)\
    Value: `app.bubble.io`\
    \
    Would instead be set up as:\
    Name: `@`\
    Value: `app.bubble.io`
