Manage domains and HTTPS
Every app with a web port can get an HTTPS URL on the instance’s app domain as soon as it deploys, with no DNS work. When you are ready to serve it on your own name, add a custom domain, and Orchard issues and renews its certificate for you. You manage generated URLs, custom domains, and redirects on the app’s Network tab.
Generated URLs
Section titled “Generated URLs”When you create an app and set a port’s reach to Private link or Public link, Orchard generates a URL on the app domain. Private link requires people to sign in. Public link is open to anyone. The reach options Public port and Internal do not generate a URL.
Add a custom domain
Section titled “Add a custom domain”Prerequisites
Section titled “Prerequisites”- An app with a TCP port.
- Access to the DNS settings of the domain.
- A CNAME target. A superadmin sets it under Instance admin > Configuration > Custom domains.
- Open the app.
- Go to Network.
- In Domains, select Add domain.
- Enter the domain, such as
app.example.com. - Keep Point to this app selected.
- If the app has more than one port, select the Port.
- Select Add domain.
- In the Set up DNS dialog, add the record it shows at your DNS provider.
- Wait for the status to change from Waiting for DNS to Connected.
- Select Done.
To open this dialog later, open the domain’s menu and select DNS setup….
-
Add the domain:
orchard domain create --deployment <id> --host app.example.com --service-port 3000 -
Add the DNS record at your DNS provider.
-
Check the record:
orchard domain validate-dns app.example.com
After the record resolves, cert-manager issues a certificate and renews it. The domain’s status shows Securing while the certificate is in progress.
Prove you own a domain
Section titled “Prove you own a domain”An instance can require proof of ownership before anyone adds a custom domain. This setting is off by default.
When it is on, add one more record at your DNS provider. The DNS setup shows the exact name and value:
| Type | Name | Value |
|---|---|---|
TXT | _orchard-challenge.app.example.com | Shown in the dialog |
The value is different for each project and domain. Until Orchard finds the record, adding the domain fails with the error domain_proof_required, and the message gives the record to add. You can remove the record after the domain is added.
You do not need the record in these cases:
- The domain is under a generated URL on this instance.
- The project already uses the domain.
- Your organization already verified the domain, or a parent of it.
Redirect a domain
Section titled “Redirect a domain”A redirect sends visitors from a domain to another address. It keeps the path and query string.
- Go to Network > Domains.
- Select Add domain.
- Enter the domain.
- Select Redirect.
- In Redirect to, enter the destination.
- In Status, select 307 Temporary, 302 Found, 308 Permanent, or 301 Moved Permanently.
- Select Add domain.
To change a redirect, open its menu and select Edit redirect…. If you change the domain, Orchard provisions the new domain before it removes the old one.
You can edit an existing redirect from the CLI:
orchard domain update <domain-id> --redirect-to www.example.com --redirect-status 308orchard domain update <domain-id> --host new.example.comCertificates
Section titled “Certificates”| Setup | Certificates |
|---|---|
Installer, public mode | One certificate for each hostname, over HTTP-01 |
Installer, lan mode | Self-signed certificates |
Installer, tunnel mode | Cloudflare terminates TLS. Orchard does not use cert-manager. |
| Helm chart with a DNS-01 issuer | A wildcard certificate. |
Related resources
Section titled “Related resources”- Protect an app - Require a sign-in or a password before a domain opens.
- Reach apps over Tailscale - Give an app a private address instead of a public domain.
- A certificate never issues - Find out why a domain stays on Securing.
orchard domainreference - Every flag of theorchard domaincommands.