Custom Domain Name on Dewacloud

Custom Domain Name on Dewacloud

Advertisements

If you use Dewacloud’s PaaS service, you can apply an external domain address to your site instead of the usual environment URL, for example like my-project.dewacloud.com. 

Custom domains can certainly help improve branding regarding your web application on the internet, so that later there will be more people who can find out.

Custom Domain Name on Dewacloud

But before that, let’s first learn the basics regarding this custom domain.

Advertisements
  • Domain – This is the name you specify to access the website. Domains are also commonly referred to as addresses, so people can memorize them more easily if they want to visit your site. The last part of the domain (.org, .com, .net) is a TLD (Top Level Domain), in front of the name there is an SLD (Second Level Domain). You can read more about the different types of domains in our article.
  • Root Domain – It is a combination of TLD and SLD, without any subdomains. This Root Domain already represents all your websites. And all sites have their own root domain.
  • DNS – Is a system for converting a text domain name into an IP Address. It is used to identify or search the website. For example, when you type www.mydomain.com in the address bar, the actual IP address that you get from the server hosting the page will appear, for example 220.50.240.20. Well, if you write https://220.50.240.20/ then the same site will appear too.

Before using a custom domain in the environment, there are a few things you must do first. Such as.

  • Buy a domain.
  • Configure DNS.
  • Do bind domains.
TRENDING:  Pengertian Domain Kodomain Dan Range

Come on, let’s start with the first one.

How to Buy a Domain

To buy a domain, there are many services that provide it. You can also buy on Dewaweb.com there are many choices of cheap and trusted domains.

Here are the steps to buy a domain on Dewaweb.

  1. Login or register for a Dewaweb account (if not already)
  2. Visit the domain page, then search for the domain you want.
  3. Check the availability of the domain along with the extension you want.
  4. Continue the domain purchase process according to the steps provided.

After buying a domain, next we will configure its DNS.

How to Configure DNS Records

If the domain purchase has been successful, proceed with configuring DNS records. But before that there are terms that you should know first.

There are several variations of DNS Record types that can be addressed to your Dewacloud environment, including:

  • CNAME – To map your custom domain to the environment domain (you will need to bind the domain in the tutorial below).
  • ANAME (if supported by your DNS Server) – To map the entire root domain. For example like mydomain.com to your domain environment or to another root domain.
  • A Record – To map a custom domain to your public IP (this requires an external IP attached to the environment).
Note: CNAME / aName DNS records can be used in conjunction with a Shared Load Balancer (without Public IP). However, for a production environment we recommend using a public IP and configuring an A Record.
In case of setting up a Private Cloud, when the platform owner controls all the environments, the Shared Load Balancer can be disabled. So use CNAME as a production-ready option.

Well, if you already understand the terms above. Let’s move on to configuring your domain records.

  1. Find the domain that you will use in the domain registrar section and click on Manage DNS. If you purchased a domain on Dewaweb, this menu can be found under Account > Manage Domains .
    Manage domains
  2. Click the Add Records menu .
  3. Set the type of domain you want to use the record for, the TTL, and the IP or Hostname. If you want to use a TLD, leave the field in front of the domain name blank.
    Dewaweb custom domain bindings
  4. Then complete the column of records that have been selected below.
TRENDING:  Apa Arti Domain Toko

In this example, for A Record, the fields that must be filled include:

  • Host: Enter the hostname that is linked to the A record. Here we are using a TLD, so we leave it blank.
  • IP or Hostname: The public IP address that exists in your environment.

    Tip: You can see the public IP in the environment/node by clicking the arrow next to the environment name. Dewacloud public IP

  • TTL: to set how long the DNS Server should cache your A Record information (to delay before new settings, so that any changes will be applied further).
  • If you have filled in the column, click Save.
Note: Any changes you make to your DNS, can take up to 48 hours to take effect across the internet.

Then which DNS should be used? Read the explanation first.

Which DNS Records to Use?

Before deciding which one to use, check the rules below.

    • Use A Record if your environment uses Public IP.

name1.mydomain.com > 111.111.111.111 name2.mydomain.com >
111.111.111.112

    • Use a CNAME if you want to assign a custom domain to the environment.

name1.mydomain.com >
env1.domainhoster.comname2.mydomain.com > env2.domainhoster.com

  • Use ANAME if you want to redirect DNS Zone (root domain) to another with all subdomains resolved through the same subdomain.
      • mydomain.com > hosterdomain.com

    Later, each subdomain in your domain will be directed to the appropriate subdomain on the hosting provider’s service, as follows {subdomain}.mydomain.com > {subdomain}.hosterdomain.com.

      • mynewcompany.com > myoldcompany.com

    Later, you can redirect all traffic from the old domain to the new domain. And keep all subdomains the same as {subdomain}.mynewcompany.com > {subdomain}.myoldcompany.com.

      • mydomain.com > env1.hosterdomain.com 

    Later, the subdomain of the custom domain will point to a subdomain that matches the target environment, {subdomain}.mydomain.com> {subdomain}.env1.hosterdomain. com.

Next is to bind the domain to the environment.

How to Bind Domain to Environment

When you don’t use a public IP address (meaning the DNS Record points to environment name field via CNAME or ANAME). Then you have to do a bind domain. This will require Shared Load Balancers to properly route traffic to the target environment.

Note : Binding custom domains via the Dewacloud dashboard is not required if the environment uses a public IP for your environment because incoming traffic does not need to go through the SLB.
  1. Select the environment you want to bind the domain to, and select Settings.
    bind domain to environment
  2. Next on the following page, select Custom Domains on the left. And enter the custom domain in the right column, if you have clicked Bind.
    Dewacloud custom domain binding
Note: It may take you a few minutes for the new URL settings to take effect.

At this point, you can try to access the domain in the browser whether it can enter your environment or not.

If so, congratulations you can use it. So that users can more easily if they want to visit your web application.

Advertisements