If you manage multiple websites for different clients, you know the infrastructure headache all too well. Ten clients usually mean ten web applications, ten databases, ten SSL certificates to provision, and ten separate instances to patch when a vulnerability drops. But what if you could host all of them on a single installation, sharing one codebase and one database, while still giving each client their own unique domain name and isolated environment? DNN Platform Built on the .NET framework, DNN Platform has had multi-tenancy baked into its core for over two decades. By leveraging its "Portals" architecture, you can run an unlimited number of distinct websites from a single Internet Information Services (IIS) application. DNN Platform In this guide, we will break down how to harness DNN’s multi-tenant capabilities using a modern stack: Windows Server 2022 and SQL Server 2022. The Magic of DNN Portals In DNN terminology, a Portal is a tenant. When you install DNN, you automatically create the Host (Superuser) account and the default portal. Portal Host Because DNN is a deeply dynamic Content Management System (CMS), the entire site structure, content, and user base are stored in the SQL Server database rather than as static files. When an HTTP request hits the IIS server, DNN intercepts it, checks the incoming domain name against its PortalAlias table in the database, and serves the specific content for that tenant. PortalAlias The clients never know they are sharing a server. To them, client-a.com and client-b.com are completely separate entities with their own logins, themes, and content. To you, it’s one folder to update. client-a.com client-b.com The Environment: Windows Server 2022 & SQL Server 2022 Before you can spin up your tenants, you need a robust foundation. 1. SQL Server 2022 DNN requires an SQL database to store the configurations for all your portals. Provisioning: Create a single, blank database in SQL Server 2022 (e.g., hackernoon.local) by using SQL Server Management Studio. You may get the latest version of SQL Server Management Studio by visiting the link below: Provisioning: hackernoon.local Install SQL Server Management Studio Install SQL Server Management Studio Security: Create a dedicated SQL login named hackernoon.local with db_owner mapping to this database. Security: hackernoon.local db_owner Since this one database will hold the data for all your tenants, securing it with a strong, dedicated service account is critical. In this tutorial, we will use SQL Server authentication, but you may use other authentication options below if needed: all SQL Server authentication Microsoft Entra ID authentication Windows authentication (default option in SQL Server Management Studio) Microsoft Entra ID authentication Windows authentication (default option in SQL Server Management Studio) By default, the following password policies are checked, but for the demonstration purposes I will uncheck them. Enforce password policy Enforce password expiration User must change password at next login Enforce password policy Enforce password expiration User must change password at next login User Mapping: Make sure that the database has the db_owner mapping. db_owner 2. Windows Server 2022 (IIS) On your Windows Server 2022 machine, ensure the Web Server (IIS) role is installed with ASP.NET 4.8 (or the specific version required by your target DNN release). Website Directory: Create a directory to host web app data. This will be a different directory than the database directory. e.g. C:\Websites\hackernoon.local. File System: Extract the DNN Platform installation files from the Install package (e.g. DNN_Platform_10.2.3_Install.zip) into a single directory (e.g., C:\Websites\hackernoon.local). Website Directory: Create a directory to host web app data. This will be a different directory than the database directory. e.g. C:\Websites\hackernoon.local. Website Directory: C:\Websites\hackernoon.local File System: Extract the DNN Platform installation files from the Install package (e.g. DNN_Platform_10.2.3_Install.zip) into a single directory (e.g., C:\Websites\hackernoon.local). File System: Permissions: Grant the IIS AppPool\hackernoon.local Full control (or modify if you prefer a stricter environment) permission to the target folder. DNN needs to write files (like logs and portal-specific assets) to the file system. Host file mapping: On the Search menu, type Notepad. In the search results, right-click Notepad and select Run as Administrator. Make sure that All Files is selected in the bottom right corner of Notepad. Permissions: Grant the IIS AppPool\hackernoon.local Full control (or modify if you prefer a stricter environment) permission to the target folder. DNN needs to write files (like logs and portal-specific assets) to the file system. Permissions: Grant the IIS AppPool\hackernoon.local Full control (or modify if you prefer a stricter environment) permission to the target folder. DNN needs to write files (like logs and portal-specific assets) to the file system. Permissions: IIS AppPool\hackernoon.local Host file mapping: On the Search menu, type Notepad. In the search results, right-click Notepad and select Run as Administrator. Make sure that All Files is selected in the bottom right corner of Notepad. Host file mapping: On the Search menu, type Notepad. In the search results, right-click Notepad and select Run as Administrator. Make sure that All Files is selected in the bottom right corner of Notepad. Host file mapping: Notepad Run as Administrator All Files Navigate to the following path: c:\Windows\System32\Drivers\etc c:\Windows\System32\Drivers\etc Select hosts file. hosts Add the following lines: 127.0.0.1 hackernoon.local 127.0.0.1 hackernoon.local 127.0.0.1 client-a.com 127.0.0.1 client-a.com 127.0.0.1 client-b.com 127.0.0.1 client-b.com Step-by-Step: Installation of Master Instance Assuming you have made the correct configurations, you can call the installation wizard by visiting http://hackernoon.local/Install/InstallWizard.aspx. It is important that no errors have been logged during the installation. Step-by-Step: Configuring Multi-Tenancy Assuming you have run the initial DNN installation wizard for your primary domain (e.g., hackernoon.local), here is how you start adding tenants. Step 1: Add the New Domain Binding in IIS IIS needs to know to route the new client's domain to your single DNN instance. Open Internet Information Services (IIS) Manager on your Windows Server 2022 instance. Right-click your master DNN website and select Edit Bindings... Click Add. Set the Type to http or https, enter your new tenant's domain in the Host name field (e.g., client-a.com), and click OK. Open Internet Information Services (IIS) Manager on your Windows Server 2022 instance. Internet Information Services (IIS) Manager Right-click your master DNN website and select Edit Bindings... Edit Bindings... Click Add. Add Set the Type to http or https, enter your new tenant's domain in the Host name field (e.g., client-a.com), and click OK. Host name Note: Both hackernoon.local and client-a.com are now pointing to the exact same physical folder on the server. Note: Both hackernoon.local and client-a.com are now pointing to the exact same physical folder on the server. Step 2: Create the New Portal in DNN Step 2: Create the New Portal in DNN Now, you must tell DNN what to do when a user arrives via that new domain. Log into your primary DNN site (hackernoon.local) using your Host (Superuser) account. Host Navigate to the Persona Bar (the admin menu) and go to Manage > Sites. Manage Sites Click Add New Site. Add New Site Fill in the site details: Site URL: This is the most crucial step. Enter client-a.com here. This tells DNN to map incoming requests from this domain to this specific new portal. Site URL: Title / Description: Specific to the client. Title / Description: Template: Choose a starting template (Default or a custom one). Template: Click Create. Create Step 3: DNS Configuration Step 3: DNS Configuration Finally, ensure the DNS A-Record for the websites you manage are pointing to the public IP address of your Windows Server 2022 machine. In this tutorial, I used local hosts file and mapped all hostnames to the localhost ip address (127.0.0.1) What Happens Under the Hood? What Happens Under the Hood? When a visitor navigates to client-a.com, the following sequence occurs: DNS routes the user to your Windows Server 2022 IP. IIS sees the host header client-a.com, matches it to your DNN site binding, and passes the request to the DNN application pool. DNN's Application Start intercepts the request. It queries the SQL Server 2022 database, specifically the PortalAlias table. It finds client-a.com mapped to PortalID 1 (where your master site might be PortalID 0). DNS routes the user to your Windows Server 2022 IP. DNS IIS sees the host header client-a.com, matches it to your DNN site binding, and passes the request to the DNN application pool. IIS DNN's Application Start intercepts the request. It queries the SQL Server 2022 database, specifically the PortalAlias table. DNN's Application Start It finds client-a.com mapped to PortalID 1 (where your master site might be PortalID 0). DNN dynamically generates the page structure, skin (theme), and modules associated only with PortalID 1. only The Business Case for DNN Multi-Tenancy The Business Case for DNN Multi-Tenancy Hosting multiple tenants via DNN Portals on a modern Windows/SQL Server stack offers massive advantages for agencies and SaaS providers: Zero-Friction Upgrades: When a new version of DNN drops, you update the core files once. All 10, 50, or 100 portals are updated simultaneously. Resource Efficiency: Instead of 50 IIS worker processes eating up your Windows Server 2022 RAM, you have one. Instead of 50 databases to backup in SQL Server 2022, you have one single, highly optimized backup routine. Centralized Module Management: If you buy a third-party plugin (like a Form builder or SEO tool), you install it once at the Host level, and you can authorize specific portals to use it. Zero-Friction Upgrades: When a new version of DNN drops, you update the core files once. All 10, 50, or 100 portals are updated simultaneously. Zero-Friction Upgrades: once Resource Efficiency: Instead of 50 IIS worker processes eating up your Windows Server 2022 RAM, you have one. Instead of 50 databases to backup in SQL Server 2022, you have one single, highly optimized backup routine. Resource Efficiency: Centralized Module Management: If you buy a third-party plugin (like a Form builder or SEO tool), you install it once at the Host level, and you can authorize specific portals to use it. Centralized Module Management: Conclusion Conclusion Multi-tenancy doesn't have to mean building a complex, custom-routing architecture from scratch. By combining the enterprise-grade stability of Windows Server 2022 and SQL Server 2022 with the mature Portal architecture of the DNN Platform, you can build a highly scalable, easy-to-maintain hosting environment for your clients. Stop managing servers, and start managing sites.