# Host Sitefinity CMS on a separate IIS server for local development

## Overview

This article explains how to host Sitefinity CMS on an IIS instance and make it accessible to the ASP.NET Core Renderer application. You can use this setup for local development purposes.

> info **PREREQUISITES**: You must comply with the following:
>
> * Your Sitefinity CMS application must be hosted on an IIS instance.\
>   For more information, see [Run projects on IIS](https://www.progress.com/documentation/sitefinity-cms/run-projects-on-iis).
> * You must have installed Microsoft Visual C++ Redistributable.

After you have hosted your Sitefinity CMS on an IIS, depending on the port setup, you can do the following:

## Scenario 1: Sitefinity CMS listens to unique port

When Sitefinity CMS is the only running application that listens to a specific port, such as 80 or 433, you can configure the Renderer application in one of the following ways:

* In the `appsettings.json` file of the Renderer, modify the URL to be the IP address of the machine that hosts the Sitefinity CMS.
* Add a binding in your hosts file that has a custom domain pointing to the IP address of the machine that hosts the Sitefinity CMS. Afterwards, use this binding in the `appsettings.json` file of the Renderer application.

## Scenario 2: Sitefinity CMS shares a port

When Sitefinity CMS is hosted alongside other applications on the same port, the applications are differentiated by their domain names.

> info **NOTE**: The following procedure assume that Sitefinity CMS is hosted with domain name `mysitefinity.com`, under the default ports – 80 and 443.

1. Download the NuGet package [Progress.Sitefinity.Cloud.AppGatewayHostRewriteModule](https://www.nuget.org/packages/Progress.Sitefinity.Cloud.AppGatewayHostRewriteModule/).
2. Change the file extension from `.nupkg` to `.zip` and extract the files.
3. In the extracted folder, navigate to the `Content` folder.
4. Copy the `HostRewriteModule.dll` and paste in a dedicated folder.

   > info  **NOTE**: The folder must to be accessible by the IIS. The file must remain in this folder for as long as the extension is used. Deleting the file or its folder can cause issues.
5. Open *Internet Information Services (IIS) Manager*.
6. At the top, select your server and click *Modules*.
7. Click *Configure Native Modules* » *Register*.
8. Set the name to `AppGatewayHostRewriteModule`
9. In *Path*, navigate to the `HostRewriteModule.dll`, select it, and click *OK*.
10. Ensure the checkbox next to `AppGatewayHostRewriteModule` is selected and click *OK*.
11. Because both applications are on the same machine, set the Sitefinity CMS binding to `localhost` on port *8080*.
12. Open the `appSettings.json` of the ASP.NET Core Renderer application.
13. In the `Sitefinity` object, add the property `"HostHeaderName": "X-Original-Host"`
14. Update the URL property to `mysitefinity.com`
15. Save and close the `appSettings.json`.

> info **NOTE**: You can add a binding in your hosts file to the same domain - *mysitefinity.com*.\
> The binding must point to the IP Address of your IIS instance. Then, you use that binding in the `appsettings.json` file of the Renderer.
