Ning Kailiang's Website Building Blog 简体中文
IIS website setup configuration

IIS website setup configuration:What are the basic steps to set up a new website in IIS?

Author:Ning Kailiang's Website Building Blog · Date:20261017

This page answers the following questions about“IIS website setup configuration”:What are the basic steps to set up a new website in IIS?How do I configure bindings for an IIS website?How do I set up an html">application pool for a new IIS website?How can I configure permissions for an IIS website's physical folder?What are common configuration issues when setting up an IIS website?

Q: What are the basic steps to set up a new website in IIS?

A: To set up a new website in IIS, open IIS Manager, right-click the Sites node, and select Add Website. Provide a site name, set the physical path to your content folder, and assign a unique binding (IP address, port, and host header). Optionally configure a default document and html">application pool. After clicking OK, the site starts automatically, and you can browse it locally. Ensure the html">application pool identity has read permissions on the physical path, and open the required port in Windows Firewall if accessing remotely.

Q: How do I configure bindings for an IIS website?

A: In IIS Manager, select your site and click Bindings in the Actions pane. Click Add to create a new binding, then choose the type (http or https), IP address (All Unassigned or a specific IP), port, and host header. For HTTPS, select an SSL certificate. Host headers let multiple sites share the same IP and port. Use Edit to modify existing bindings and Remove to delete them. After changes, restart the site if needed, and verify DNS records point to the correct server.

Q: How do I set up an html">application pool for a new IIS website?

A: In IIS Manager, right-click Application Pools and choose Add Application Pool. Give it a name, select the .NET CLR version (or No Managed Code), and choose pipeline mode (Integrated is recommended). After creating it, edit the site in Sites and set its Application Pool to the new one. Configure the pool identity under Advanced Settings > Process Model > Identity, typically ApplicationPoolIdentity. Adjust idle timeout, recycling, and real-time settings as needed for performance and stability.

Q: How can I configure permissions for an IIS website's physical folder?

A: Grant the html">application pool identity access to the site's physical path. In File Explorer, right-click the folder, choose Properties > Security > Edit > Add, and enter IIS AppPool\YourPoolName. Assign at least Read & Execute and List Folder Contents. For sites that write files, grant Modify on specific subfolders. Avoid granting Everyone full control. Also verify NTFS inheritance and, if using impersonation, ensure the impersonated account has access. Test by browsing the site and checking for 401 or 500 errors.

Q: What are common configuration issues when setting up an IIS website?

A: Common issues include incorrect bindings (wrong port or host header), missing DNS records, firewall blocking the port, and insufficient NTFS permissions causing 401.3 errors. A stopped html">application pool or wrong .NET CLR version can cause 500 errors. Ensure default documents are configured and the physical path exists. For HTTPS, verify the certificate binding and that the certificate is trusted. Check Event Viewer and enable failed request tracing in IIS to diagnose specific errors.

IIS website setup configuration

Words of experience

Common scenarios of "IIS website setup configuration"

【System Admin】 Hi, I need help configuring a new website in IIS for our internal portal. Can you guide me through the process?

【IIS Expert】 Sure! First, open IIS Manager. You can do this by typing 'inetmgr' in the Run dialog. Once open, expand the server node in the left pane.

【System Admin】 Got it, I see the server node. What's next?

【IIS Expert】 Right-click on 'Sites' and select 'Add Website'. This will open the Add Website dialog.

【System Admin】 Okay, the dialog is open. It asks for Site name, Physical path, and Binding information. What should I enter?

【IIS Expert】 For Site name, use something descriptive like 'InternalPortal'. For Physical path, browse to the folder where your website files are stored, e.g., C:\inetpub\InternalPortal.

【System Admin】 I've set the name and path. Now for binding: I want it accessible on port 80 with host header 'portal.company.local'. Is that correct?

【IIS Expert】 Yes, that's correct. Set Type to 'http', IP address to 'All Unassigned' or a specific IP, Port to 80, and Host name to 'portal.company.local'. Then click OK.

【System Admin】 Done. The website is created but when I browse to it, I get an HTTP Error 500.19 - Internal Server Error. What does that mean?

【IIS Expert】 That error usually indicates a configuration issue, often due to missing IIS components or incorrect web.config settings. Check if the URL Rewrite module is installed if your web.config uses rewrite rules.

【System Admin】 I didn't install URL Rewrite. My web.config has rewrite rules. Should I install it?

【IIS Expert】 Yes, download and install the URL Rewrite module from Microsoft's IIS site. After installation, restart IIS and try again.

【System Admin】 I installed URL Rewrite and restarted IIS. Now I get a different error: HTTP Error 404.3 - Not Found. The page you are requesting cannot be served because of the extension configuration.

【IIS Expert】 That suggests the handler for your file extension isn't enabled. If it's an ASP.NET app, ensure ASP.NET is installed and registered with IIS. You can run 'aspnet_regiis -i' from the .NET framework folder.

【System Admin】 I ran aspnet_regiis -i. Now the site loads, but the CSS and images aren't loading. The console shows 404 errors for static files.

【IIS Expert】 Check if the Static Content feature is installed. In Server Manager, go to Add Roles and Features, under Web Server (IIS) > Web Server > Common HTTP Features, ensure 'Static Content' is checked.

【System Admin】 Static Content was not installed. I added it and now the site looks fine. One more thing: how do I set up a custom 404 error page?

【IIS Expert】 In IIS Manager, select your site, then double-click 'Error Pages'. Click 'Edit Feature Settings' and choose 'Custom error pages'. Then add a custom 404 page by clicking 'Add' and specifying the path to your custom HTML file.

【System Admin】 I've set the custom 404 page. Also, I want to enable logging to track visits. Where can I configure that?

【IIS Expert】 Select your site, then double-click 'Logging'. You can enable logging, choose the log format (W3C is default), and set the directory. You can also schedule log file rollover.

【System Admin】 Great, logging is enabled. Thanks for all the help! The site is now fully operational.

【IIS Expert】 You're welcome! Glad it's working. Don't forget to regularly check logs and keep IIS updated for security.

This article was published byNing Kailiang's Website Building Blog, For more knowledge about“Website Building” please followNing Kailiang's Website Building Blog。

Recent Articles