---
title: "Introducing More Flexible Domain Association for Deno Subhosting"
description: "Deno Subhosting now supports organization-wide wildcard domains where different subdomains under one wildcard (e.g. foo.example.com and bar.example.com under *.example.com) can map to different deployments."
url: "https://swe.quest/articles/introducing-more-flexible-domain-association-for-deno-subhosting-2440a1f9a8b8134b"
canonical: "https://deno.com/blog/subhosting-flexible-domain-association"
source: "Deno"
published: "2024-06-14"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 4
tags: ["api-design","dns","multi-tenancy","serverless"]
---

# Introducing More Flexible Domain Association for Deno Subhosting

A post on [Deno](https://swe.quest/sources/deno.md), published 2024-06-14, 4 min read, Announcement. Original: [https://deno.com/blog/subhosting-flexible-domain-association](https://deno.com/blog/subhosting-flexible-domain-association)

## Summary

Deno Subhosting now supports organization-wide wildcard domains where different subdomains under one wildcard (e.g. foo.example.com and bar.example.com under \*.example.com) can map to different deployments. Domain names can use {deployment.id} and {project.name} template variables, with restricted formats allowed on deno.dev. Custom domains are registered via the Subhosting API, get TLS certificates provisioned, and are then attached at deployment creation through a new domains field or later via PUT/DELETE endpoints. Attaching a domain automatically detaches it from any previous deployment.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [API design](https://swe.quest/tags/api-design.md) (Backend & APIs)
- [DNS](https://swe.quest/tags/dns.md) (Infrastructure)
- [Multi-tenancy](https://swe.quest/tags/multi-tenancy.md) (Architecture & design)
- [Serverless](https://swe.quest/tags/serverless.md) (Backend & APIs)

## Prerequisites

- REST APIs ([easy posts on API design](https://swe.quest/tags/api-design.md?difficulty=easy))
- DNS and wildcard domains ([easy posts on DNS](https://swe.quest/tags/dns.md?difficulty=easy))

## Keywords

Deno Subhosting, Deno Deploy, deno.dev

## Related posts

- [Manage your Deno Deploy and Deno Subhosting projects with Terraform](https://swe.quest/articles/manage-your-deno-deploy-and-deno-subhosting-projects-with-terraform-699764d70221ef58.md): Deno · 2023-12-05 · Medium · 6 min read · Infrastructure as code, Serverless, Deployment, TypeScript
  Deno now ships an official Terraform provider (denoland/deno) for managing Deno Deploy and Deno Subhosting projects, custom domains and deployments as infrastructure-as-code.
- [Build Your Own Cloud IDE with the Subhosting API](https://swe.quest/articles/build-your-own-cloud-ide-with-the-subhosting-api-182e8468c60d1771.md): Deno · 2024-01-16 · Medium · 10 min read · Serverless, TypeScript, Developer tools, API design
  A cloud IDE can be built on the Deno Subhosting API, which programmatically deploys user code to Deno Deploy's global V8 isolate cloud within seconds.
- [Run npm and Deno anywhere](https://swe.quest/articles/run-npm-and-deno-anywhere-02ce4590033c3918.md): Deno · 2022-11-18 · Medium · 7 min read · Deployment, Containers, Cloud platforms, JavaScript
  Deno apps, including those using npm specifiers, can be containerized with the official denoland/deno Docker image and deployed to any VPS or container platform, not just Deno Deploy.
- [How security and tenant isolation allows Deno Subhosting to run untrusted code securely](https://swe.quest/articles/how-security-and-tenant-isolation-allows-deno-subhosting-to-run-untrusted-code-bc85ef9b28cccb45.md): Deno · 2023-11-27 · Easy · 6 min read · Multi-tenancy, Sandboxing & isolation, Serverless, Linux
  Deno Deploy and Deno Subhosting isolate untrusted tenant code using layered defenses mapped to a five-point threat model: per-deployment V8 isolates, a virtualized filesystem, and separate VPCs for ingress and outbound traffic.
- [Deno 1.45: Workspace and Monorepo Support](https://swe.quest/articles/deno-1-45-workspace-and-monorepo-support-dcf6c24db7aa3c2a.md): Deno · 2024-07-11 · Medium · 11 min read · JavaScript, TypeScript, Build systems, Developer tools
  Deno 1.45 adds workspace support for monorepos, configured via a "workspace" array in deno.json.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
