Host Umbraco in IIS

How to host Umbraco website on IIS

Umbraco

Step 1: Install IIS

Press windows icon button and type “Turn Windows features on or off” and press enter then show below image and highlight row checkbox select then click OK, let it install, and restart your PC if needed.

IIS

Step 2: Publish your Umbraco project

First create one folder your project name in this file path - C:\inetpub\wwwroot\

wwwroot folder for umbraco

Open visual studio with your project and Right-click your project → Publish then show below show screen below image wise

Publish umbraco Webiste

Now click on New profile then open new popup and select “Folder” option press Next button.

select folder publish

After press Next button then show new popup as below image wise and click Browse button then select this path : C:\inetpub\wwwroot\YourProjectName and after select path then press “Ok” and after press “Finish” then your publish profile create successfully.

publish webiste

After finish publish profile process then show screen as below image wise press highlighted “Publish” button then all code is published successfully.

successfully publish umbraco website

Step 3: Configure IIS Site

  • Open IIS Manager
  • Right-click Sites → Add Website
  • After click Add Website then show popup as per below image wise please update your project detail as per highlighted box after update all details then press “OK”.

Create website in IIS

Step 4: Update your hosts file

  • Open File Explorer
  • Open file : C:\Windows\System32\drivers\etc\hosts
  • Open hosts file in Notepad as Administrator add this line : 127.0.0.1 UmbracoGraphql (update your hostname)

Root File add hotname

Step 5: Configure web.config (if missing)

Open visual studio with your project and Right-click your project and add new file name assign “web.config” and paste it code as per below code:

webconfig file

WebConfig Code :

<?xml version="1.0" encoding="utf-8"?> 

<configuration> 

<location path="." inheritInChildApplications="false"> 

<system.webServer> 

<handlers> 

<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" /> 

</handlers> 

<!--Update processPath as per your project wise--> 

<aspNetCore processPath="bin\Debug\net8.0\UmbracoGraphql.exe" arguments="" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" hostingModel="inprocess"> 

<environmentVariables> 

<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" /> 

<environmentVariable name="ASPNETCORE_HTTPS_PORT" value="443" /> 

</environmentVariables> 

</aspNetCore> 

</system.webServer> 

</location> 

</configuration> 

Step 6: Update launchSettings.json file

Need to add IIS profile in launchSettings.json file please add code as per below image wise and also update applicationurl & launchurl as your project hostname wise

launchSettings

Step 7: Browse Your Site

Go to: https://UmbracoGraphql

UmbracoGraphql

Written by
Nishantimage 1

Nishant Vaghasiya

Technical Architect

I'm Nishant Vaghasiya, a Technical Architect and Umbraco & Sitecore Certified Developer at Arroact Technologies. I specialise in building digital solutions with Umbraco and Sitecore that are practical, scalable, and built to last.

Over the years, I've learned that the best solutions aren't always the most complex ones, they're the ones that make a team's day-to-day work simpler and give them confidence that the system won't let them down.

That's what drives me writing code that performs well, stays reliable, and continues to create real impact long after it goes live.

FAQs

Frequently Asked Questions

Press the Windows icon and type “Turn Windows features on or off”. Enable the checkbox for Internet Information Services (IIS), click OK, and restart your computer if required.
Create a new folder inside C:\inetpub\wwwroot\ with your project name. This will be your publish destination folder.
Open your project in Visual Studio → Right-click on your project → Select Publish → Choose Folder option → Set the path to C:\inetpub\wwwroot\YourProjectName → Click Finish → Then click Publish to deploy the code.
Open IIS Manager → Right-click on Sites → Select Add Website → Fill in the Site Name, Physical Path (your published folder), and Host Name → Click OK.
Open C:\Windows\System32\drivers\etc\hosts as Administrator in Notepad → Add this line: 127.0.0.1 UmbracoGraphql (replace “UmbracoGraphql” with your hostname).
Create a new web.config file in your project root. Add the following configuration:

<configuration> 
 <location path="." inheritInChildApplications="false"> 
   <system.webServer> 
     <handlers> 
       <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" /> 
     </handlers> 
     <aspNetCore processPath="bin\Debug\net8.0\UmbracoGraphql.exe" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" hostingModel="inprocess"> 
       <environmentVariables> 
         <environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" /> 
         <environmentVariable name="ASPNETCORE_HTTPS_PORT" value="443" /> 
       </environmentVariables> 
     </aspNetCore> 
   </system.webServer> 
 </location> 
</configuration>
Add an IIS profile in your launchSettings.json file and update applicationUrl and launchUrl based on your project hostname (e.g., https://UmbracoGraphql).
Once everything is configured, open your browser and go to https://UmbracoGraphql (or your custom hostname).

Related Blogs blue-line-vector-3

How Umbraco's MCP Server Makes Your CMS AI-Powered
16 April 2610 min read
Umbraco
How Umbraco's MCP Server Makes Your CMS AI-Powered
If you have been paying attention to what's going on with AI tools you probably know that …
Read More
How Umbraco Cloud Keeps Your Website Fast, Secure, and Scalable
06 April 2613 min read
Umbraco
How Umbraco Cloud Keeps Your Website Fast, Secure, and Scalable
Most digital teams do not want to think about hosting they want to build things publish co…
Read More
umbraco-17-graphql-headless-api-arroact
11 February 2615 min read
Umbraco
Umbraco 17 GraphQL Package – Build Flexible Headless APIs with Arroact.Umbraco.GraphQL
Are you building a headless website using Umbraco 17 and finding the Delivery API difficul…
Read More