---
title: Domains
url: "/docs/domains/configuration/"
canonical_url: https://docs.blossom88.com/docs/domains/configuration/
markdown_url: https://docs.blossom88.com/docs/domains/configuration.md
summary: Configure domains for your applications with flexible SSL options
categories:
- domains
- networking
- ssl
- configuration
---

# Domains

Blossom makes it easy to configure domains for your applications. With a Domain, you can serve your application through your own domain name (e.g., `myapp.com`) instead of using the generated [Blossom managed URL](/docs/domains/generated/).

A [static site](/docs/build/static/#your-domain) takes a CNAME to
`sites.onblsm.page` instead; its HTTPS comes from the CDN, so the modes below
don't apply.

## SSL Modes

Blossom offers four SSL modes for your domains:

1. **Automated HTTPS** - Automatically obtains and manages SSL certificates through Let's Encrypt. This is the option most users should start with.

2. **Self-signed SSL** - Useful behind a CDN that accepts a self-signed origin
   certificate, such as Cloudflare Full mode. Blossom manages that certificate
   for CDN-to-origin traffic; it is not intended for direct browser trust.

3. **HTTP Only** - For when SSL is handled by your CDN and needs an HTTP origin. For example, Cloudflare Flexible SSL or CloudFront.

4. **Wildcard HTTPS** - For wildcard domains like `*.example.com`. Requires a configured DNS provider for automatic certificate management. The credentials are used to create a DNS record, validate, and delete the DNS record immediately.

## Quick Setup

1. Navigate to the Environment's Domains section
2. Click "Add New Domain"
3. Enter your domain name (e.g., `myapp.com`)
4. Select your preferred SSL mode
5. For wildcard domains, select a DNS provider
6. Configure DNS with the target Blossom displays

## CLI Setup

You can also manage domains with the Blossom CLI:

```sh
blossom dns_provider:types
blossom dns_provider:list
blossom dns_provider:init
```

dns_provider.yml:

```yaml
dns_provider:
  name: production-cloudflare
  provider_type: cloudflare
  credentials:
    api_token: ${CLOUDFLARE_API_TOKEN}

  # For Amazon Route 53, use an existing AWS cloud provider instead:
  # provider_type: route53
  # cloud_provider_id: cloud_provider-100
```

```sh
blossom dns_provider:create --data dns_provider.yml
blossom domain:init
```

domain.yml:

```yaml
domain:
  environment_id: environment-100 # replace with your environment id
  dns_name: www.example.com
  mode: https_automated
  main: false
  # For Wildcard HTTPS, use a wildcard DNS name and choose a DNS provider.
  # dns_name: "*.example.com"
  # mode: dns_wildcard
  # dns_provider_id: dns_provider-100
  # To send traffic to another public Service than web, such as an api or mcp
  # process, name it. Omit for web.
  # service_id: service-100
```

```sh
blossom domain:create --data domain.yml
blossom domain:list --environment environment-100
blossom domain:show --id domain-100
```

Inline data works well for automation:

```sh
blossom domain:create --data '{"domain":{"environment_id":"environment-100","dns_name":"www.example.com","main":true}}'
```

Blossom infers the SSL mode from the domain name. Regular names use Automated
HTTPS. Wildcard names such as `*.example.com` use Wildcard HTTPS.

Set `mode` only when you need one of the explicit alternatives:

- `self_signed`
- `http_only`

Wildcard HTTPS requires `dns_provider_id`. Use `blossom dns_provider:list` to
find an existing provider, or create one with `blossom dns_provider:create`.

### Send A Path Or A Host To Another Service

A domain reaches the Environment's `web` Service. Two settings send traffic
elsewhere:

| Need | Setting | Example |
|---|---|---|
| A path on every domain, on the same host | A route, on the Environment's **Routing** page | `/cable` to a separate ActionCable process |
| A whole host | The domain's Service | `api.example.com` to an `api` process |

Rails ActionCable connects to `/cable` on the page's own host, with its login
cookie, so give it a route:

    blossom route:create --data '{"route":{"environment_id":"environment-100","service_id":"service-100","path":"/cable"}}'
    blossom route:list --environment environment-100

Each path belongs to one Service, and a route applies at once, without a
deploy. `blossom app_plan:init` adds `/cable` for a Procfile `cable` process.

Give a separate API its own host:

    blossom domain:create --data '{"domain":{"environment_id":"environment-100","dns_name":"api.example.com","service_id":"service-100"}}'

An empty `service_id` on `domain:update` returns the domain to `web`. In the
Web UI, an Environment with more than one public Service shows a **Service**
field on the domain form.

## DNS Configuration

After adding the Domain, create the DNS record Blossom displays. The destination
can change as Blossom keeps the Domain connected to the Environment, so use the
current Product guidance rather than an address copied from elsewhere.

## Troubleshooting

If a Domain needs attention, inspect its TLS state, Environment logs, and
Activity. See [Troubleshooting](/docs/debug/).

## Related Documentation

- For direct wildcard SSL configuration, see [Wildcard Domains](/docs/domains/wildcard-direct/)
- For CDN-based wildcard SSL configuration, see [CDN Wildcard Domains](/docs/domains/wildcard-cdn/)
