Sari la conținutul principal
FreeThree checks for your projectUptime, accessibility, SEO and cookie checks for your project
Menu

Domains and certificates

Add your own domain to your website, bind a domain to another environment and remove one.

On this page

Every environment has a preview address from the moment it exists. To serve your website under your own domain, you add the domain to the project and point its DNS at Tilizy. The certificate for HTTPS is issued for you. This page shows how to add, list and remove domains.

Add a domain

  1. Add the domain to the project. The command asks for the host name, whether it is the primary domain of the project, and an optional note:

    tilizy domain:add

    It confirms the host name it added. Tilizy starts routing the name at once, and the environment answers on it shortly after, without a new deploy.

  2. Point the DNS of the domain at Tilizy, at your DNS provider.

  3. Wait for the certificate. It is issued once the domain points to Tilizy. Until then the preview address keeps working, so you can add the domain before you switch the DNS.

  4. Check the result:

    tilizy domain:list

    The list shows every host name of the project and the environment each one belongs to.

A project has one primary domain. Add further host names, such as the www form, with the same command.

Give a domain to another environment

Without a flag, a domain belongs to the live environment. To bind a host name to another environment, for example a staging address under your own domain, name the environment:

tilizy domain:add -e staging

The certificate for that host name is issued in the same way, once its DNS points to Tilizy.

Remove a domain

tilizy domain:remove www.example.com

The command asks you to confirm. Without a host name, it lets you pick one from the list. Your DNS records are not changed: remove or repoint them at your DNS provider.

The preview address

The preview address of an environment is protected, so only your team can open it. To open an environment in your browser without typing the preview password:

tilizy app:open --staging

Use -e <branch> for a copy from a branch and --prod for live. Add --print to print the address instead of opening it.

Which project the commands use

The domain commands find the project from the Git remote of the checkout you are in. Outside a checkout, name it with -p <project>.

What can go wrong

  • No certificate yet. The certificate is issued only after the domain points to Tilizy. Check the DNS records, and remember that DNS changes take time to reach everyone.
  • The website refuses the new host name. Tilizy passes the list of your domains to the application. On Drupal, a settings file that sets trusted_host_patterns itself overrides that list, and the website then rejects requests for a domain you added later. Do not replace the list in your settings: set your own patterns only when the environment variable TILIZY_DOMAINS is absent. tilizy app:validate warns about this.
  • The domain opens the wrong environment. A host name added without -e goes to live. Remove it and add it again with the right environment.

Next: Environments and the firewall in front of your website.