Custom domain and DNS

When an app is created, Bubble uses the name you provide to generate a unique URL where you can run of your app. For example, if your app has the name my-bubble-application, Bubble generates the URLs below:

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

What does it mean to connect to a custom domain?

Setting up a custom web domain means configuring your app to be accessed through a specific domain name that you've chosen, rather than the default address provided by Bubble. This involves registering a unique domain name (like www.example.com) and then linking it to your website. In that sense, the domain makes up the "root" of all your app's URL's.

Connecting to a custom domain means to customize your site’s URL, making it more recognizable and often more professional-looking, reflecting your brand or the app's purpose more accurately.

Setting up a custom domain is done in three steps:

The first step is to buy the domain you want, and register it with a .

Example.com versus www.example.com

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

For example:

Your custom URLUser typesRedirects to

example.com

https//www.example.com

https//example.com

www.example.com

https//example.com

https//www.example.com

Connecting a domain

Step 1: Register the domain

Many registrars also offer hosting, meaning that 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 server, you don't need to purchase hosting as well. Make sure you only pay for the domain.

Using a domain that incorporates the term bubble, such as www.bubbleagency.com, is not permitted for a custom domain in Bubble. This is because it violates our terms of service. Custom domains must avoid using 'bubble' to maintain compliance with our guidelines.

Page: Terms of service

Domains are purchased from a company known as a domain registrar. Once it has been purchased, it becomes your unique identifier on the web, and no one can register the same domain as you. Many domains are registered for the first time, but there's also a market for buying existing domains that ranges from a few US dollars to several million.

Domain registrars

Registrars are accredited entities that manage the reservation of domain names. There are many different providers and in the list below you'll find some of the biggest ones:

  1. Google Domains - https://domains.google

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.

Users access 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 have used when you want to configure it in Bubble, as long as you have access to make changes to the .

To set up the domain with your app, do the following:

  1. Naviagte to the Settings tab and Domain/email sub-tab.

  2. Enter the domain you purhcased in step 1 in the Domain name input

  3. Click Set up this domain

When you've completed these steps, Bubble will show you the DNS records that you need for step 3. Typically, they look something like this:

Do not use the IP addresses above – they are only meant as an illustration. Use the IP addresses that Bubble provides in the Domain subtab.

TypeNameValue

A

104.16.36.105

A

104.16.42.105

A

104.19.240.93

A

104.19.241.93

A

www

104.16.36.105

A

www

104.16.42.105

A

www

104.19.240.93

A

www

104.19.241.93

This table outlines the DNS A record configurations with their respective types, names, and values.

What are "Type A" records?

A records, or Address Records, are a fundamental part of DNS (Domain Name System).

They map a domain name to its corresponding IP address, which is a numerical label assigned to each device on a network. This mapping allows users to access websites using familiar domain names (like www.example.com) rather than numeric IP addresses. A records are essential for directing internet traffic and making the web user-friendly.

Why are there so many similar records?

Multiple IP addresses

Having multiple IP address values for a domain in DNS settings provides redundancy and load balancing:

  • Redundancy ensures that if one server (or IP address) becomes unavailable, others can take over, maintaining the accessibility of your app.

  • Load balancing distributes traffic across several servers, improving app performance and reducing the chance of overloading a single server.

This setup enhances the reliability and efficiency of hosting your app. You only need to set the DNS records once.

Domain prefix

In the example above, you'll see that we link to four different records two times (one blank and one with www). This means that both https://my-app.com and https://www.my-app.com will properly redirect to your app.

Step 3. Change the DNS settings

After obtaining the DNS details, there's no need to make any more adjustments within Bubble. Your next steps should be carried out in the domain registrar service where your domain is managed.

  1. Look for the DNS settings or DNS Zone File within your registrar’s dashboard.

  2. In this section, remove any existing A records that have an empty name ('') or www

  3. Replace them with the records provided earlier. Note that . Proceed by adding the records accordingly.

Navigating this process can get somewhat technical, as the interface varies between registrars. If you need some guidance, it’s a good idea to contact your registrar’s customer support. Also, feel free to seek advice on the forum, as there’s a good chance another user has experience with the same registrar and can offer helpful insights.

Propagating the changes

After setting up the DNS records, the new settings need to propagate across the internet. This can take up to 24 hours, but usually you should see some results after 2-4 hours, and sometimes faster.

Why do DNS settings need time to propagate?

For those new to the concept, let's talk about why DNS settings need time to propagate.

DNS stands for Domain Name System, which is essentially the phonebook of the internet. It's a system that translates human-friendly domain names like "bubble.io" into IP addresses like "192.0.2.1" that computers use to communicate with each other.

Now, imagine if every time you needed a phone number, you had to look it up in a giant phone book that contains every number in the world. It would be incredibly slow. To make this process faster, various systems and networks around the world keep their own local copies of parts of this “phonebook”.

When you update your DNS settings, this change needs to be reflected in all those local copies (DNS servers). This process is known as propagation.

However, since these copies are not all updated instantly (they refresh at different intervals), it takes time for them all to catch up with the change. This is why you might not see your website immediately after you've made changes to its DNS settings, and why sometimes your friend in another country can see the changes sooner or later than you can.

Typically, DNS propagation can take anywhere from a few minutes to 48 hours, depending on various factors including the settings of the DNS servers and how often they are set to update their records.

The propagation process is up to the registrar, and cannot be affected by Bubble.

Checking the DNS settings

Bubble lets you check the success of the operation below the records, and you can check the process by clicking on the Check my settings button. If you encounter an error, it could indicate that the records have not been configured correctly, or that the changes have not yet propagated through the system. See our FAQ below for possible solutions to common errors.

As soon as a domain is properly configured, all requests to yourapp.bubbleapps.io will automatically be redirected to yourdomain.com. This applies to both the Live and Development anvironment.

Setting up a subdomain

What is a subdomain?

Imagine a website being like an office building, and the domain name is the building's address. A subdomain is like a specific department or section within that building, with its own unique 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 additional part added to the front of the domain, separated by a dot. For instance, support.yourapp.com could be the subdomain for the customer support section of your main app located on yourapp.com.

This way, you can organize different parts of the app (like having separate areas for blog posts, customer support, legal documentation and product pages), all while still being connected to the main domain.

If you already are using a domain and would like to use a subdomain to point to your Bubble app (for instance, app.yourapp.com). The steps are mostly identical to the above, with just a few changes:

When you purchase a domain name, you gain the rights to create subdomains within it, and you don't need to buy these subdomains separately.

Subdomains, like blog.example.com or shop.example.com, are part of the main domain (example.com) and can be set up directly through your domain registrar's website.

Changing/removing a domain

If you need to change your domain, you first need to remove the current domain. Clicking on 'delete this domain name' will terminate the connection between the application and the domain.

Note that your domain will still point to Bubble's server until you remove the DNS records in the registrar service. A Bubble page will be displayed with a message indicating there is no app linked to this domain. Once you have removed the domain, you can add a new domain as described above.

Note that if you remove a domain and want to use an appname.bubbleapps.io domain as initially happens, you may have to clear the browser cache, as the redirection is usually cached at the browser level.

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

A domain change, once complete, should not effect or render invalid any dynamic URL expressions. Uploaded files are stored on S3/appforest rather than on the domain directly, so everything should redirect appropriately.

SSL encryption (HTTPS)

For all apps created after October 2019, TLS is mandatory and this setting cannot be changed. The below section is only relevant for apps that were created before this.

All apps hosted on a bubbleapps.io subdomain are already automatically set up with TLS, and this setting can't be changed.

Setting up TLS (SSL)

What is TLS and SSL?

TLS (Transport Layer Security) and SSL (Secure Sockets Layer) are cryptographic protocols designed to provide secure communication over a computer network, such as between the Bubble server and the devices of you and your users.

TLS is the newer version of SSL and offers enhanced security features, but SSL as a term is still often used interchangeably with 'TLS' in everyday language. In practice, SSL is considered deprecated today, and Bubble uses TLS for all connections.

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

Once you have properly configured your domain and that Bubble has validated the A records, you can start the process. To have TLS activated on your site, enable the checkbox.

This change can take up to one hour to propagate. For customers using Cloudflare, SSL is mandatory.

FAQ: Domain and DNS

How long does it take for my domain to move to Cloudflare?

Two minutes to several hours, depending on how long your DNS records take to update.

The moment you register your custom domain with Bubble and Cloudflare, your domain is registered with both services. In order for it to work correctly, Cloudflare needs to validate that your DNS entries point to their servers.

When you update your DNS records (adding, removing, or renaming a record), the length of time they stay available is determined by the record's TTL (time-to-live) value.

Let's say you change a record at your registrar, and that record has a TTL of 1 hour. After 1 hour, you can be certain that that server is reporting your new record to the internet. However, there are many name servers on the internet, and all of them will need to have your most up-to-date record. On average, you can expect your records to be broadcast across the internet within twice the length of your TTL. So if your TTL is 1 hour, expect your record to be everywhere after 2 hours.

Once your record has been updated everywhere, Cloudflare will be able to verify that you own the domain, and your app will become active.

Why are my users are getting "This Connection is Not Secure" errors?

Cloudflare has not validated your domain yet.

If you click on "Advanced" and then look at the certificate details, and the certificate is of the form ssl123456.cloudflare.net, your DNS entry is pointing to the correct place, but Cloudflare has not validated your domain yet. Please wait an hour and check again.

How do I know my site is working on Cloudflare?

There are several tools.

The first, to check to see if your domain records have propagated, is the Google DNS lookup tool.

When you've changed your domain records, you can go to the A record tab to check to see if your A record has propagated.

mywebpage.us. 299 IN A 104.19.241.93
mywebpage.us. 299 IN A 104.19.240.93

You can also take advantage of a service like What's my DNS, which tests your custom domain from many locations all over the world. It's not uncommon to see a few blank entries on this page; what you're looking for is any records that return an error (red X) or different results than you are expecting.

Cloudflare serves a page on a certain route on every site hosted on their domain at /cdn-cgi/trace. You can see bubble's page at bubble.io/cdn-cgi/trace; replace 'bubble.io' with your own custom domain (once it loads) to see if it's working.

The output should look somewhat 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
I've followed all the instructions here, and I still get "This Connection is Not Secure."

It's possible that we cannot issue SSL certificates on your domain. You will have to remove your CAA record and try again.

Go to the Google DNS lookup tool's CAA tab and check to see if your bare domain (e.g. example.com) has a CAA record. A CAA record restricts which certificate providers can issue certificates for your domain. (Only about 1% of Bubble apps have a CAA record.)

For instance, 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 across the google.com domain.

SSL Certificate issuance 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 begin working in a matter of minutes.

I'm getting 525 errors on my site.

Wait an hour and check again.

If you are a Legacy Customer who wasn't using SSL prior to switching over to Cloudflare, some of Bubble's servers won't have your updated certificate available to them. A 525 error happens when the Origin Server (where your app is hosted on Bubble) serves nonsecure content (http) to a server that is expecting secure content (https). We refresh your SSL and certificate settings on all servers once per hour, so if you've recently changed your settings wait and try again.

I'm getting 1001 errors.

Verify your A records, wait two hours, and check again.

Cloudflare has to verify that your A records are pointing to Bubble's IPs. If you're sure your A records are correct, Cloudflare will schedule a re-check of your records for several days (starting at 1 minute intervals, increasing to a maximum of 2 hours between checks). If, after 2 hours, your site is still showing 1001 errors, go to Bubble, delete your custom domain, wait one minute, and re-create it.

I am getting 1014 errors

If you're using Cloudflare for DNS, turn off proxying.

The most common cause of 1014 errors is when you're using Cloudflare for DNS, and you're using an "orange cloud" (proxy) setting. Click the orange cloud to turn off proxying (resulting in a grey cloud).

I am a Legacy Customer; what should I do to temporarily disable Cloudflare?

If you're having problems that you think might be caused by Cloudflare, you can temporarily disable Cloudflare by changing your DNS records from A 104.xxx.xxx.xxx to the A record you were previously assigned.

When you've identified what the problem was and are ready to turn Cloudflare back on, delete the A record and replace it with the A records Bubble provided you.

Other ways to learn

Video lessons
Relevant articles

What is a RESTful API?

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.

Last updated