# Manage domains and HTTPS > Use the generated HTTPS URL for an Orchard app, add a custom domain, configure DNS, and redirect a domain. Source: https://docs.orchard.hackclub.com/deploy/domains/ 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 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](/deploy/networking/#reach) options **Public port** and **Internal** do not generate a URL. ## Add a custom domain ### Prerequisites - An app with a TCP port. - Access to the DNS settings of the domain. - A CNAME target. [A superadmin sets it](/operate/finishing-setup/#set-the-custom-domains-target) under **Instance admin** > **Configuration** > **Custom domains**. ### Steps **Dashboard** 1. Open the app. 2. Go to **Network**. 3. In **Domains**, select **Add domain**. 4. Enter the domain, such as `app.example.com`. 5. Keep **Point to this app** selected. 6. If the app has more than one port, select the **Port**. 7. Select **Add domain**. 8. In the **Set up DNS** dialog, add the record it shows at your DNS provider. 9. Wait for the status to change from **Waiting for DNS** to **Connected**. 10. Select **Done**. To open this dialog later, open the domain's menu and select **DNS setup…**. **CLI** 1. Add the domain: ```sh orchard domain create --deployment --host app.example.com --service-port 3000 ``` 2. Add the DNS record at your DNS provider. 3. Check the record: ```sh 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 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](/teams/sso/#verify-an-email-domain), or a parent of it. ## Redirect a domain A redirect sends visitors from a domain to another address. It keeps the path and query string. **Dashboard** 1. Go to **Network** > **Domains**. 2. Select **Add domain**. 3. Enter the domain. 4. Select **Redirect**. 5. In **Redirect to**, enter the destination. 6. In **Status**, select **307 Temporary**, **302 Found**, **308 Permanent**, or **301 Moved Permanently**. 7. 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. **CLI** You can edit an existing redirect from the CLI: ```sh orchard domain update --redirect-to www.example.com --redirect-status 308 orchard domain update --host new.example.com ``` ## 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](/operate/wildcard-certificates/). | ## Related resources - [Protect an app](/deploy/protection/) - Require a sign-in or a password before a domain opens. - [Reach apps over Tailscale](/deploy/tailscale/) - Give an app a private address instead of a public domain. - [A certificate never issues](/operate/troubleshooting/#a-certificate-never-issues) - Find out why a domain stays on **Securing**. - [`orchard domain` reference](/reference/cli/#domain) - Every flag of the `orchard domain` commands.