After reading the article you'll know:
What an SSL certificate is
How to define a host within Betty Blocks
how to verify your domain hostname
How to provide the SSL to Betty Blocks
My own domain?
When you've developed a fully customized front end on top of your back-end application, you might want to show this custom UI to the entire world. Well, you can already do this straight away because your app's front end is directly accessible with the link every page has (e.g. myapp.betty.app/home).
But instead of having to use the betty.app domain, you might rather want your custom UI to be accessible through your own domain. Well, let's set this up then!
What is an SSL certificate?
The SSL certificate ensures an encrypted connection, which will also grant you an HTTPS connection. An SSL certificate is required in order to set the app to your own domain so we're not only learning how you can set the app to your own domain, but we'll also explain how we can install an SSL certificate on your domain.
What are we going to do?
Setting up your app to load on your own domain is not that hard, but it has to follow certain steps, which will listen very closely. We need to set some settings for you, based on the certificate you've got, and you need to set some settings for your domain as well. Basically, we need to do 2 things. We need to (1) set up the application to load on your own domain and (2) we need to install the SSL on this domain. More specifically, these are steps we need to take.
Define the host in the application settings in My Betty Blocks. (1)
Verify your domain via the hostname settings.
Create a CNAME record for the app in your domain's DNS settings. (1)
Send us the SSL certificate (min. 12 months) and Private Key, along with the needed details to install this on the app. (2)
That's all! Piece of cake right?
Not? Don't worry. We'll elaborate each step for you.
Define the host in My Betty Blocks
First, you'll have to set your own domain as a host in the applications web options in My Betty Blocks. If you're in your app right now, go to the Settings menu in the builder bar and click on General to open the application overview. You can also open my.bettyblocks.com, login and click on your application if you're not logged in to your app at the moment.
Once you're at the overview, go to the app settings in My Betty Blocks, and then click on the
HOSTNAMES tab in the middle of your page.
Here, you can enter each host you want to use for your web app.
A normal app SSL will provide 1 full domain (e.g. www.mywebsite.com or my.mywebsite.com) but if you're using a Wildcard SSL, you'll have to define all the full domains you want to use, so a different host for every subdomain (i.e. my.mywebsite.com, app.mywebsite.com, portal.mywebsite.com).
Verifying your domain in the hostname section
Before being able to connect with your domain, we have to make sure that the domain is secure and that you or your colleagues have complete control of the domain.
To verify your domain, follow the next steps in the hostname section of your applications settings.
As an example, we are going to verify ‘my.application.com’
Add ‘my.application.com’ to the list of hosts in my.bettyblocks.com and press the "add hostname" button.
A new field opens up with a domain-verification token. Copy the token for ‘my.example.com’
Navigate to your DNS provider with your domain verification token.
Add a TXT record to ‘my.application.com’ via the interface of your DNS Provider with the value: ‘bettyblocks-domain-verification=<yourtokenhere>’
Click on the verify button next to ‘my.application.com’ in my.bettyblocks.com to have Betty verify your domain.
*It may take up to 48 hours for the txt record to take into effect due to DNS caching.
*Values and settings per DNS provider might differ, make sure to read the provider's guide when working with your DNS settings.
Create a CNAME record in your domain's DNS settings
After a successful verification, you can remove the TXT verification line from your DNS and set the CNAME record for your application.
If you can log in to the management environment of your domain provider you can likely do this here. If you don't have a login for a management environment you can contact your domain provider (or your IT department) for this. If you tell them you need to add a CNAME to your DNS, they'll know how to help. Most providers also offer some kind of documentation on how you can do this for your domain. The DNS resource records you can create have only got 3 properties most of the time. See the example below.
Beware! There's some inconsistency between providers here. In our example, the first field asked for the HOST. If your provider asks for a subdomain instead of a domain or host, the correct value would be www, instead of my.application.com (or app if you want to connect app.application.com).
When this is all set up, your application is connected to your domain! It may take a couple of minutes for your provider to process your request, but it shouldn't take very long (and the message 'default backend - 404' will appear)
From here on, get in touch with our support department to get things finalised since you need an SSL certificate to be installed on our servers, this is where your effort becomes a joint effort. :)
Provide us with your SSL certificate and private key
If you've got an SSL certificate, you'll have to share this with us.
Also, don't forget to send the private key in a separate email. Without the private key, we are not able to handle your request. Whichever way you please, you'll need to get in touch with our Support Team via the Intercom button in your app or by sending an email to email@example.com.
Please keep the following in mind:
We only accept SSL certificates with a duration of 12 months or longer. Anything shorter than 12 months will be rejected.
Submit your SSL certificates to our support department, a minimum of 14 days prior to the launch (or expiration) date of your websites certificate
You will be charged fees if you do not submit the SSL certificate necessary for the installation, in time.