Skip to main content

About domains

Hostnames

By default, when you create a cloudspace, you are given a hostname for your production stage. For example prod-mycloudspace-a1b2c3.mogenius.io, where a1b2c3 is the unique ID for that cloudspace generated by mogenius. Each stage you create has its own hostname. Also, each service within a stage is available under its own hostname.

For example

StageServiceHostname
Productionprod-mycloudspace-a1b2c3.mo1.mogenius.io
MySQLmysql-prod-mycloudspace-a1b2c3.mo1.mogenius.io
Testingtesting-mycloudspace-a1b2c3.mo1.mogenius.io
MySQLmysql-testing-mycloudspace-a1b2c3.mo1.mogenius.io
Developmentdevelopment-mycloudspace-a1b2c3.mo1.mogenius.io
MySQLmysql-development-mycloudspace-a1b2c3.mo1.mogenius.io

Use your own domain

You can use a custom domain (www.yourdomain.com) for a service published on mogenius. You should consider this if you want your application to be publicly available so that it is easy for others to remember.

To use a custom domain, you must change your domain's DNS records and set up a CNAME record that points to your service's external hostname (for example, "mysql-prod-mycloudspace-a1b2c3.mogenius.io"). Typically, you do this by logging into your domain host's website (for example, GoDaddy, Enom, or Name.com). Each domain registrar works differently, and we encourage you to contact your domain host for questions directly related to managing your own domain's DNS settings. However, the following steps are similar for each domain host in most cases.

Create a CNAME record

  1. Go to your domain's DNS records.
  2. Add a record to your DNS settings with the type CNAME.
  3. Fill in the entry according to the documentation of your domain host so that the CNAME destination is set to your mogenius hostname (e.g. mysql-prod-mycloudspace-a1b2c3.mo1.mogenius.io)
  4. Save your entry. Note that it may take up to 72 hours for the changes to take effect.

Verify your domain with TXT records

When using a domain with mogenius for the first time, you need to verify it. After entering your custom domain in the service settings, you'll be asked to set two TXT records in your DNS settings (just like you do it with the CNAME record).

Here's an example for dev.mogeniustest.com which we entered as a custom domain to our service.

After saving, the settings prompt two sets of information for the expected TXT records:

  1. The first TXT record should hold the content under the subdomain _cf-custom-hostname.mogeniustest.com.

    hostname validation

  2. The second TXT record should contain the content under mogeniustest.com.

    certificate validation

Once the TXT records are active in your DNS settings, refresh the service page and both certificate validation and hostname validation should be in an active state. Depending on your DNS provider this can take a few minutes.

The TXT validation has wildcard capability for one level of subdomains, meaning you can use several custom domains across multiple mogenius cloudspaces under the same domain, without validating the domain each time.