Migrating an IIS website means moving its application, hosting configuration, dependencies and access paths to a new server. Copying the web root is rarely sufficient. Application pools, runtime versions, certificates, private-key access, native modules, authentication and external data all influence whether the new site behaves like the old one.
This procedure describes a controlled move between Windows Server IIS hosts, with pre-cutover testing and a defined write-consistency plan. It does not assume that a whole-server configuration backup can be restored unchanged onto any newer OS. Windows Server 2019, 2022 and 2025 can differ in security defaults and supported components, so validate the target release and every application dependency.
Inventory the website as a service
Record each site name, ID, physical path, application, virtual directory and binding. Include hostnames, ports, IP-specific bindings, HTTPS certificates and Server Name Indication. List application pools, identities, .NET settings, pipeline mode, bitness, recycle settings and startup behavior.
Capture the installed IIS role services and extra components such as URL Rewrite, hosting bundles, third-party modules and native libraries. Record environment variables, registry dependencies, COM components and scheduled jobs. A deployment package may not contain everything installed manually years earlier.
Import-Module WebAdministration
Get-Website | Select-Object Name,ID,State,PhysicalPath,Bindings
Get-WebApplication | Select-Object Path,ApplicationPool,PhysicalPath
Get-WindowsFeature Web-* | Where-Object Installed
Protect the inventory because paths, hostnames and identities reveal infrastructure details. Preserve configuration backups and application deployment artifacts outside the server. Identify the authoritative application version rather than copying an untracked directory and hoping it matches the source repository.
Separate application data from deployable content
Classify files into application binaries, configuration, static content, uploaded content, generated files and logs. Identify databases, external shares and queues. An initial file copy can run before the outage, but writable data needs a final synchronization or application-supported migration after writes stop.
Define which system owns writes during each phase. Running old and new application instances against the same database may be supported, unsupported or dangerous depending on schema versions, background workers and job scheduling. Do not assume that using one database automatically makes parallel testing safe.
Choose a recovery point and rollback method. If the new application changes database schema or accepts uploads after cutover, returning DNS to the old server may not restore compatibility or preserve new data. The application owner must define how those changes will be reversed or reconciled.
Prepare the target host independently
Build and patch the new Windows Server, install the required IIS role services and supported runtimes, and apply the intended baseline. Recreate only documented dependencies. Avoid importing every server-wide setting from the old host before reviewing whether it is still needed or supported.
Create the required directories and application pools. Use the intended service identity or gMSA where supported, and grant narrow permissions to content, upload folders, network resources and certificate keys. An application-pool identity is not automatically allowed to access another server's share or database.
Check outbound dependencies as well as inbound web ports. DNS, database connections, SMTP relays, APIs, proxy settings and firewall allowlists can differ on the new host. A static homepage loading locally does not prove that the application can complete a real transaction.
Choose and rehearse the transfer method
Use the application's supported deployment process where available. Web Deploy can package or synchronize IIS applications and configuration, but review its providers, parameters and deletion behavior. A broad synchronization can remove destination content that is absent from the source. Use preview or what-if capabilities and inspect the intended changes first.
Microsoft's IIS documentation shows dependency inspection using Web Deploy:
msdeploy -verb:getDependencies -source:apphostconfig="OrdersSite"
Run the installed tool from its appropriate location and replace the site name. Review inherited and server-level settings separately because dependency output is not a complete application inventory. Older Web Deploy articles describe historical tool prerequisites; use a currently supported package and validate its compatibility with the target environment.
If using a file-based transfer, preserve the necessary content and security deliberately. Do not run a mirror command against a production destination without understanding deletions. Keep deployment logs and inspect failures involving locked files, inaccessible paths or missing modules rather than silently skipping them.
Migrate configuration secrets and TLS safely
Encrypted configuration can depend on machine-specific keys or a particular protection provider. Copying an encrypted connection string to a different machine may leave the application unable to decrypt it. Use the application's supported secret migration or reconfiguration method and avoid exposing decrypted values in logs or temporary files.
Obtain or securely export the appropriate certificate with its private key where policy permits. Import it to the intended certificate store, protect the transfer file and configure the new HTTPS binding. Verify the certificate name, chain, validity period and renewal process. A certificate appearing in the store without its private key cannot serve the same role as the original.
Grant private-key access only to the identities that require it. Remove temporary key-export files through the approved handling process after verification. Check client-certificate authentication, central certificate stores or automated renewal components separately if used; those are additional configuration dependencies.
Test the new site before changing public routing
Use a controlled hosts-file override, test DNS name or load-balancer test path that sends requests to the new server while preserving the hostname needed for binding and TLS. Do not browse to an IP address and treat a certificate mismatch or wrong-site response as an application verdict.
Test anonymous and authenticated access, authorization, static files, uploads, downloads, redirects, session behavior and representative database operations. Confirm expected denial behavior for unauthorized paths. Check application logs, IIS logs and Windows events with timestamps so failed tests can be traced.
For integrated Windows authentication, verify SPNs, identity and any delegation design through the application's real access path. For applications behind a reverse proxy, validate forwarded headers and HTTPS detection so the new host does not create redirect loops or insecure links.
Freeze writes and perform cutover
Schedule the final window, stop or quiesce the old application and complete the final content or data transfer. Disable duplicate background workers and scheduled jobs as required. Take the agreed recovery backup immediately before irreversible application changes.
Change the intended DNS record, load-balancer pool or proxy target, then verify from representative client networks. DNS caches and persistent connections may keep some users on the old server temporarily. Keep the old service in a deliberate state that prevents conflicting writes, rather than leaving two independent active sites by accident.
Monitor request failures, latency, authentication, certificate behavior and application-specific business indicators. Verify backups and monitoring now cover the new host. Retain the old host and configuration through the acceptance period, with ordinary user writes prevented.
Recover with data consistency in mind
If pre-cutover validation fails, repair the destination while the source remains authoritative. If post-cutover validation fails, use the documented routing and data rollback plan. Determine whether the new site has written data before reactivating the old one. Returning traffic alone does not undo schema changes, queue processing or uploaded files.
After acceptance, remove temporary test overrides, stale bindings, unused secrets and obsolete firewall exceptions. Record the target build, application version, certificate renewal owner and recovery location. Microsoft's IIS synchronization guidance explains the deployment-tool model; use it with the application's current deployment and recovery instructions.
Related procedures
How to Install .NET Framework Features on Windows Server; How to Configure IIS Application Pool Recycling; How to Request and Install an IIS TLS Certificate.