Custom domain and DNS
Last updated
Last updated
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:
Development:
https://
my-bubble-application
.bubbleapps.io/version-test/
Live:
https://
my-bubble-application
.bubbleapps.io
Domains are the root of your app's or website's URL. For example, the Bubble website is hosted on the domain www.bubble.io
.
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.
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.
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 . The operation is done in two steps:
Set up the domain in Bubble
Set up the DNS records in the registrar's interface to point to Bubble
To set up the domain with your app, enter the domain in the input box in the Settings - Domain section and click Set up this domain. Once you've done this, Bubble will provide the DNS records that you should enter on the registrar's end.
After obtaining the DNS details fro the Settings, 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.
Look for the DNS settings or DNS Zone File within your registrar’s dashboard.
In this section, remove any existing A records that have an empty name ('') or 'www', and replace them with the records provided earlier. Note that some registrars use '@' as a placeholder for an empty domain. 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.
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.
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.
As soon as a domain is properly configured, all requests to yourapp.bubbleapps.io will automatically be redirected to yourdomain.com.
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), you can do this by simply using this as the domain in the input box.
The DNS records will be different, but the process of entering them in your registrar service is similar as above.
If you had a custom domain name assigned to your Bubble app prior to October 2019, you are considered a Legacy Customer. If you have never assigned a custom domain to your Bubble app before, ignore the instructions marked for Legacy Customers.
Your users will generally expect to be able to load your domain on example.com
andwww.example.com
. For SEO purposes, we redirect exactly one of these to the other address.
For instance, if you enter example.com
as your custom domain, we will automatically redirect www.example.com
to example.com
—as long as your DNS records are correct!
When you choose your custom domain, Bubble will instruct you to create four records at your registrar. The records will be of the form
These are provided for redundancy, but in most cases your custom domain will work identically with either or both, so long as you have at least one record for the bare domain and one for www.
If your custom domain is of the form app.example.com
, you can register the custom domain in your Bubble app, in Settings -> Domain.
Bubble will instruct you to create two records at your registrar. The records will be of the form
These are provided for redundancy, but in most cases your custom domain will work identically with either or both.
You can enter these at your registrar:
Once Bubble and Cloudflare verify your domain has been updated, your custom domain will work!
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.
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.
For all apps created after October 2019, SSL is mandatory and this setting cannot be changed. The below section is only relevant for apps that were created before this.
Note that all apps hosted on a bubbleapps.io subdomain also offer SSL support on all plans. Using SSL encryption lets you guarantee to your users that no one can intercept traffic between them and your site, and protects their private information. SSL encryption also helps with search engine rankings, and can be required to use some features (access to geolocation on Chrome, using Stripe payments, etc.).
Once you have properly configured your domain and that Bubble has validated the A records, you can start the process. To have SSL activated on your site, enable the checkbox.
This change can take up to one hour to propagate. For customers using Cloudflare, SSL is mandatory.
A. 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.
A. Change your DNS records back to the A record you were previously using.
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.
A. 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.
A. 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.
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:
A. 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:
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.
A. 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.
A. 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.
A. 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).
A. That depends.
You can search the forum to see if anyone else has had the same issue as you.
If you can't find an answer here or there, submit a bug report.