Preview multisite sites locally
If you are in a multisite environment, you can use IIS to preview your sites on your development machine. This is useful, for example, when you want to review your site changes without deployment.
Perform the following:
- Host the Renderer application in IIS.
For more information, see Publish an ASP.NET Core app to IIS on Microsoft Docs.
- Configure the bindings of the IIS site you created in Step 1 to include the site names from the multisite configuration of your project.
To do this, open IIS Manager, navigate to the site you created in Step 1, and in the right pane, click Bindings… Then add a binding for each site from your multisite configuration.
- Modify your
hosts file configuration to forward the requests for your domains to your local machine.
For example, add the following to your
NOTE: The hosts file is located in
%systemroot%\System32\drivers\etc and you need elevated Administrator rights to edit it.
- Use your browser to access the domains locally.