---
title: HTTP SPNs for IIS – Kerberos Windows Authentication for the Nodinite Web Client
description: Register HTTP SPNs and configure IIS Windows Authentication for the Nodinite Web Client and other IIS-hosted services. Covers DNS alias vs machine name, web farms, useKernelMode and useAppPoolCredentials in appcmd and IIS Configuration Editor, and HOST SPN conflicts.
---

# :fa-globe: HTTP SPNs for IIS: Kerberos Windows Authentication for the Nodinite Web Client

When a user opens the :Nodinite: [Web Client][], the browser asks Active Directory for a Kerberos ticket for `HTTP/<the hostname in the address bar>`. IIS then has to decrypt that ticket with the right account's key. If the HTTP SPN is missing, sits on the wrong account, or [IIS][IIS Overview] uses the wrong key, you see:

* A **login prompt** instead of transparent sign-in
* **401 Unauthorized** responses from the Web Client or [Web API][]
* **Slow page loads**, because the browser silently fell back to NTLM

The same applies to every IIS-hosted :Nodinite: v7 service that uses Windows authentication with a domain account: the [Web Client][], [Web API][], [Log API][], [Logging Service][], [Monitoring Service][], [MCP Endpoint][], and the [Pickup Service][].

This guide covers the IIS side of SPNs. Unlike SQL Server SPNs, HTTP SPNs depend on **the hostname users type**, and IIS has two settings that decide **which account decrypts the ticket**. For SQL Server and linked servers, see [SQL Server SPNs][SQL Server SPN]. For the concepts, the shared `setspn` commands, and the service account rules, see the [SPN hub][SPN].

## :fa-network-wired: Understanding Kerberos for IIS-Hosted Nodinite Services

```mermaid
flowchart LR
    Browser["fa:fa-user Browser<br/>site in Local Intranet Zone"]
    DNS["fa:fa-signs-post DNS<br/>nodinite.contoso.com"]
    DC["fa:fa-shield-halved Domain Controller<br/>finds owner of HTTP/nodinite.contoso.com"]
    IIS["fa:fa-globe IIS site Nodinite-PROD-WebClient<br/>Windows Authentication"]
    Pool["fa:fa-id-badge App pool account<br/>CONTOSO\svc-iis-nodinite"]
    Machine["fa:fa-server Computer account<br/>WEB01$ with HOST/web01"]
    Browser -->|"1. Resolve name"| DNS
    Browser -->|"2. Ticket for HTTP/nodinite.contoso.com"| DC
    Browser -->|"3. Present ticket"| IIS
    IIS -->|"useAppPoolCredentials = true"| Pool
    IIS -.->|"useAppPoolCredentials = false"| Machine
    style Browser fill:#2678BD
    style DNS fill:#2678BD
    style DC fill:#9E59BB
    style IIS fill:#2678BD
    style Pool fill:#93d16d
    style Machine fill:#3F827B
```

*Diagram: the browser builds the [SPN][] from the hostname of the [Web Client][] it resolved, and the Domain Controller encrypts the ticket for that SPN's owner ([NTLM vs Kerberos Authentication][] explains the fallback). IIS decrypts with the app pool account (green, preferred) or the computer account (teal, fallback) depending on `useAppPoolCredentials`. The SPN owner and the IIS setting must match.*  

### Key Components Explained

| Component | Role | Requirement |
| --- | --- | --- |
| Hostname | The name in the browser address bar; the browser builds `HTTP/<hostname>` from it | A real DNS name, not a hosts-file entry; a CNAME resolves to the target host name |
| HTTP [SPN][] | Maps the hostname to the account that can decrypt tickets | Always `HTTP/`, even for HTTPS; short name and FQDN |
| Application pool identity | The account the :Nodinite: site runs as, set in the Portal ([Step 4: Servers → Core platform services][Core platform services]) | Domain account or [gMSA][] when the [SPN][] is on the app pool account |
| `useKernelMode` | [IIS][IIS Overview] performs [Windows authentication][IIS Authentication settings] in kernel mode (HTTP.sys) | `true` for both designs below |
| `useAppPoolCredentials` | Kernel mode decrypts tickets with the app pool account instead of the computer account | `true` when the HTTP [SPN][] is on the app pool account |
| Browser zone | Browsers send Kerberos tickets automatically only to trusted sites | Site in the Local Intranet Zone, or allowed by policy |

## :fa-code-compare: Who Owns the HTTP SPN?

The design decision is which account owns the HTTP SPN. IIS must be configured to match it.

| Web Client URL | App pool identity | HTTP SPN owner | `useKernelMode` | `useAppPoolCredentials` | Recommendation |
| --- | --- | --- | --- | --- | --- |
| Dedicated DNS alias, for example `nodinite.contoso.com` | Domain account or gMSA | App pool account (`HTTP/nodinite...`) | `true` | `true` | Preferred for production and Kerberos-only environments |
| Machine name, for example `web01.contoso.com` | Domain account or gMSA | Computer account (through `HOST/web01`) | `true` | `false` | Fallback when a dedicated alias isn't possible |
| Machine name | ApplicationPoolIdentity or Network Service | Computer account (through `HOST/web01`) | `true` | `false` (default) | Works without manual SPNs; not suited to web farms |

>[!TIP]
>Use a dedicated DNS alias. It avoids conflicts with the computer account, works for web farms, and lets the TLS certificate and the SPNs follow the service instead of the server. Add the alias to the certificate SAN, see [How to perform hardening on your Nodinite installation][Hardening].

## :fa-clipboard-check: What You Need Before Starting

* The IIS site name. :Nodinite: Web Client sites follow the naming standard `Nodinite-<ENVIRONMENTNAME>-WebClient`, for example `Nodinite-PROD-WebClient` or `Nodinite-DEMO-WebClient`. The examples on this page use `Nodinite-PROD-WebClient`; replace `PROD` with your environment name.
* The application pool identity: in **IIS Manager**, select **Application Pools**, select the :Nodinite: pool, select **Advanced Settings**, and note **Identity**.
* Every hostname users and clients use to reach the site, short name and FQDN.
* Domain Admin rights, or an Active Directory administrator who can run `setspn`.

## :fa-terminal: Register HTTP SPNs

The `setspn` flags (`-S`, `-L`, `-Q`, `-X`, `-D`) are described once in the [SPN hub][SPN]. This section shows only the HTTP SPN values. Skip it if you use the machine-name fallback; the computer account already covers the machine name.

### Register SPNs for Every Client Hostname

Register an SPN for every name a client may use to reach the Web Client:

* :fa-tag: **DNS alias or CNAME** - the name users type, for example `nodinite`. Register the FQDN (`nodinite.contoso.com`) and the short name (`nodinite`).
* :fa-server: **Physical machine name** - only when clients may also browse to the server directly **and** the app pool account owns the HTTP SPNs. If the machine name conflicts with the computer account, see **HTTP SPN Ownership Conflicts** below.

Kerberos builds the ticket request from the exact name the client resolved, so a missing short name or FQDN makes authentication fail for that name only, which looks like an intermittent problem.

>[!NOTE]
>Always use `HTTP` in the SPN, even when the site uses HTTPS. There is no `HTTPS/` service class.

### Single Server with a DNS Alias

```cmd
setspn -S HTTP/nodinite.contoso.com CONTOSO\svc-iis-nodinite
setspn -S HTTP/nodinite CONTOSO\svc-iis-nodinite
```

### Load-Balanced Web Farm

In a web farm, every node must run the application pool as the **same** domain account, because the alias SPN can have only one owner.

```cmd
:: DNS alias or load-balancer name, used by all clients
setspn -S HTTP/nodinite.contoso.com CONTOSO\svc-iis-nodinite
setspn -S HTTP/nodinite CONTOSO\svc-iis-nodinite
```

Only add node names (`HTTP/web01`, `HTTP/web02`, and their FQDNs) when clients reach individual nodes directly, and check them for computer-account conflicts first.

### Non-Default Ports and Multiple Bindings

On the default ports 80 and 443, browsers don't include the port in the SPN, so `HTTP/nodinite.contoso.com` is enough. Ports matter only when one server hosts several sites under **different identities** on the same hostname, for example PROD and TEST on one box with different ports.

The clean design is a separate DNS name per site, so each SPN stays unambiguous. If that isn't possible, force the port into the SPN lookup on the IIS server, then register `HTTP/<host>:<port>` SPNs:

```powershell
# Run as Administrator on the IIS server
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\HTTP\Parameters" `
    -Name "FEATURE_INCLUDE_PORT_IN_SPN_KB908209" -Value 1 -Type DWord
iisreset
```

>[!WARNING]
>This registry value is server-wide and affects every IIS site on the machine. Use it only for multi-site, multi-identity servers that can't use separate hostnames.

## :fa-sliders: Configure IIS Windows Authentication

Set `useKernelMode` and `useAppPoolCredentials` on the :Nodinite: site to match the SPN owner from the table above. Use either the command line or IIS Manager.

### Option 1: Command Line (appcmd)

```cmd
:: Preferred: dedicated alias, HTTP SPN on the app pool account
%windir%\system32\inetsrv\appcmd.exe set config "Nodinite-PROD-WebClient" -section:system.webServer/security/authentication/windowsAuthentication /useKernelMode:"True" /useAppPoolCredentials:"True" /commit:apphost

:: Fallback: machine-name URL, computer account owns the HTTP SPN
%windir%\system32\inetsrv\appcmd.exe set config "Nodinite-PROD-WebClient" -section:system.webServer/security/authentication/windowsAuthentication /useKernelMode:"True" /useAppPoolCredentials:"False" /commit:apphost
```

### Option 2: IIS Configuration Editor

1. Open **IIS Manager** and, under **Sites**, select the :Nodinite: site, for example `Nodinite-PROD-WebClient`.
2. In **Features View**, open **Configuration Editor** in the **Management** section.
3. In **Section**, select `system.webServer/security/authentication/windowsAuthentication`.
4. Set **useKernelMode** to `True`.
5. Set **useAppPoolCredentials** to `True` for the dedicated-alias design, or `False` for the machine-name fallback.
6. Select **Apply** in the **Actions** pane.

![IIS Manager Configuration Editor showing the windowsAuthentication section with useAppPoolCredentials set to True for the Nodinite-DEMO-WebClient site][png_ConfigEditorAppPoolCredentials]  
*The `windowsAuthentication` section of the `Nodinite-DEMO-WebClient` site, with `useAppPoolCredentials` being changed from the drop-down.*  

>[!TIP]
>If **Configuration Editor** isn't available in IIS Manager, install the IIS management features listed in [IIS Windows Features][].

### Apply the Change

Run `iisreset` on the IIS server, then clear cached tickets on the client with `klist purge` before you retest.

## :fa-triangle-exclamation: HTTP SPN Ownership Conflicts

If the Web Client URL is the **machine name** (for example `https://web01.contoso.com` on server `web01`), Active Directory maps the `HTTP` service class to the computer account's built-in HOST SPN (`HOST/web01`). Registering `HTTP/web01` on the app pool account then fails with `0x21c7/8647` (not unique forest-wide), even when `setspn -Q HTTP/web01` shows no `HTTP/` row.

To resolve it:

1. Run `setspn -Q HTTP/web01`, `setspn -Q HTTP/web01.contoso.com`, and `setspn -X` to find explicit owners and duplicates.
2. If a stale account owns the `HTTP/` SPN, remove it from that account with `setspn -D`, as described in the [SPN hub][SPN].
3. If the conflict is the computer account's `HOST/` SPN, choose a design:
   * **Preferred:** move users to a dedicated DNS alias, register `HTTP/` SPNs for the alias on the app pool account, and set `useAppPoolCredentials` to `true`.
   * **Fallback:** keep the machine-name URL, leave the SPN with the computer account, and set `useAppPoolCredentials` to `false`.

>[!WARNING]
>Never move or remove `HOST/<machine>` SPNs from a computer account to make room for an app pool account. Other services on the server depend on them.

## :fa-circle-check: Verify Kerberos

1. On the client, run `klist purge`, then open a new browser window and browse to the Web Client.
2. Confirm no login prompt appears.
3. Run `klist` and look for a ticket for the hostname you used:

```text
Server: HTTP/nodinite.contoso.com @ CONTOSO.COM
KerbTicket Encryption Type: AES-256-CTS-HMAC-SHA1-96
```

If there's no `HTTP/` ticket, the browser used NTLM. Check that the site is in the Local Intranet Zone, see [Kerberos Transparent Login After v7 Upgrade][Kerberos Transparent Login], and use the diagnostic script in [NTLM vs Kerberos Authentication][].

## :fa-table: Common IIS SPN Issues

| Issue | Cause | Solution |
| --- | --- | --- |
| [Login prompt][Login Prompt] in the [Web Client][] | HTTP [SPN][] missing for the hostname used, or `useAppPoolCredentials` doesn't match the SPN owner | [Register short-name and FQDN SPNs](#register-spns-for-every-client-hostname); align [IIS settings](#fa-sliders-configure-iis-windows-authentication) with the [owner table](#fa-code-compare-who-owns-the-http-spn) |
| [Login prompt][Login Prompt] after upgrading from v6 to v7 | v7 runs as its own site under a domain account | Follow [Kerberos Transparent Login After v7 Upgrade][Kerberos Transparent Login] |
| 401 Unauthorized from the [Web Client][] or [Web API][] | HTTP [SPN][] missing on the app pool account | [Register HTTP SPNs](#register-spns-for-every-client-hostname) for every client hostname |
| Works with the FQDN, fails with the short name (or the reverse) | Only one of the two SPNs registered | [Register both](#register-spns-for-every-client-hostname) |
| Works on one web farm node, fails on another | Nodes run the app pool as different accounts | Run every node as the same account, see [Load-Balanced Web Farm](#load-balanced-web-farm) |
| [Web Client][] slow, no login prompt | Browser fell back to NTLM | See [NTLM vs Kerberos Authentication][] |
| `setspn -S HTTP/...` returns `0x21c7/8647` | [SPN][] owned by another account, or conflicts with `HOST/` | See [HTTP SPN Ownership Conflicts](#fa-triangle-exclamation-http-spn-ownership-conflicts) above |
| [Web Client][] fails with NTLM disabled | Missing HTTP [SPN][], with no fallback | [Register SPNs](#register-spns-for-every-client-hostname) for every hostname before go-live |

## :fa-hand-point-right: Next Steps

* :fa-key: [Kerberos Transparent Login After v7 Upgrade][Kerberos Transparent Login]  
* :fa-shield-halved: [NTLM vs Kerberos Authentication][]  
* :fa-lock: [How to perform hardening on your Nodinite installation][Hardening]  

## :fa-link-horizontal: Related Topics

* :fa-key: [Service Principal Names (SPN) hub][SPN]  
* :fa-database: [SQL Server SPNs (MSSQLSvc)][SQL Server SPN]  
* :fa-server: [IIS Authentication settings][]  
* :fa-window-maximize: [IIS Windows Features][]  
* :fa-users: [Trusted for delegation][]  
* :fa-server: [IIS Troubleshooting Overview][IIS Overview]  
* :fa-right-to-bracket: [Login prompt asks for a password][Login Prompt]  

[Core platform services]:{ndr}/Install%20and%20Update/Getting%20started/Version%207/Install%20Nodinite%20v7%20Steps/04%20-%20Servers.md#core-platform-services
[gMSA]:{ndr}/Install%20and%20Update/Troubleshooting/Windows/gMSA%20accounts.md
[Hardening]:{ndr}/Install%20and%20Update/Troubleshooting/IIS/How%20to%20perform%20hardening%20on%20your%20Nodinite%20installation.md
[IIS Authentication settings]:{ndr}/Install%20and%20Update/Troubleshooting/IIS/IIS%20Authentication%20settings.md
[IIS Overview]:{ndr}/Install%20and%20Update/Troubleshooting/IIS/Overview.md
[IIS Windows Features]:{ndr}/Install%20and%20Update/Troubleshooting/IIS/IIS%20Windows%20Features.md
[Kerberos Transparent Login]:{ndr}/Install%20and%20Update/Troubleshooting/IIS/Hardening/Kerberos%20Transparent%20Login%20After%20v7%20Upgrade.md
[Log API]:{ndr}/Core%20Services/Log%20API/Overview.md
[Logging Service]:{ndr}/Core%20Services/Logging%20Service/Overview.md
[Login Prompt]:{ndr}/Core%20Services/Web%20Client/Troubleshooting/Login%20Prompt%20You%20for%20a%20Password.md
[MCP Endpoint]:{ndr}/Core%20Services/MCP%20Endpoint/Overview.md
[Monitoring Service]:{ndr}/Core%20Services/Monitoring%20Service/Overview.md
[NTLM vs Kerberos Authentication]:{ndr}/Install%20and%20Update/Troubleshooting/IIS/NTLM%20vs%20Kerberos%20Authentication.md
[Pickup Service]:{ndr}/Logging%20and%20Monitoring/Pickup%20LogEvents%20Service/Overview.md
[png_ConfigEditorAppPoolCredentials]:{ndm}/Documentation%20Pictures/IM/IMUpdate/Troubleshooting/Windows/IIS_WebSite_ConfigurationEditor_useAppPoolCredentials.png
[SPN]:{ndr}/Install%20and%20Update/Troubleshooting/SQL%20Server/SPN.md
[SQL Server SPN]:{ndr}/Install%20and%20Update/Troubleshooting/SQL%20Server/SPN%20for%20SQL%20Server.md
[Trusted for delegation]:{ndr}/Install%20and%20Update/Troubleshooting/Windows/Trusted%20for%20delegation.md
[Web API]:{ndr}/Core%20Services/Web%20API/Overview.md
[Web Client]:{ndr}/Core%20Services/Web%20Client/Overview.md