Skip to main content

How to configure a custom domain

Your applications are always accessible through URLs hosted on the data2.app domain, but in many cases we want to point our applications to a custom domain.

To do this, it is necessary to:

  1. Create and validate your custom domain within Data².
  2. Add some records to the DNS where the domain is hosted.

In this guide, we will point the application https://app.murakami.data2.app/ to https://www.murakami.dev and https://murakami.dev.

Important: This feature is only available for applications that are on a paid plan.

Adding a custom domain

To add your custom domain, click the "Custom Domains" button in the left-hand sidebar to open the Custom Domains panel.

Button to open custom domains panel

In this panel:

  1. Click the "Add (+)" button.
  2. In the row that was added to the table, enter the domain you want to add in the domain column, in this case, www.murakami.dev.
  3. In destination, enter the domain of the Application you want that custom domain to point to (in this case, app). If you are unsure about your system, click the Play button in the top bar and see the available domains in your system.
  4. Click outside the domain input to save!

Your domain is now created! However, it is still necessary to validate that you actually own this domain, as we do not want other people using your domain within Data².

Validating your domain

For this and the next step, you will need to edit some DNS settings, so leave another tab open with the place where your domain is hosted. In this example, we will use Google Domains, but yours can be in any other domain registrar!

To validate your domain:

  1. Copy the value of validationText by clicking the copy button.
  2. This value should be placed in your DNS as a TXT record in the domain you will use. In this case, we will create a record for www.murakami.dev of type TXT with the copied value.
  3. Go back to the Builder tab and click on the warning icon next to the domain name to try to validate it. This step may fail a few times before succeeding as DNS changes may take time to propagate.

Pointing to Data²

To point www.murakami.dev to the application https://app.murakami.data2.app/, it is only necessary to create a CNAME record with the value data2.app. (the dot . on the end of the value may be necessary on some DNS registries). Some DNS changes may take time to propagate, so don't be alarmed if the change is not instantaneous.

In some domain providers, it is necessary to delete the TXT record created earlier before creating the CNAME record.

Apex domain

To point a root domain (or Apex), such as murakami.dev, to a Data² application, create and validate the domain as in the previous steps. However, instead of creating a CNAME record, we need to create an A record with the value 75.2.100.124, which is the IP of Data² servers.