---
title: "Microsoft - IIS server"
slug: "microsoft-iis-server"
description: "Integrate your knowledge base into your website with a subfolder setup. Learn to configure IIS and prevent duplicate content issues effectively."
updated: 2025-09-11T09:55:30Z
published: 2025-09-11T09:55:30Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.document360.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Microsoft - IIS server

Hosting a knowledge base in a subfolder seamlessly integrates documentation into your existing website structure. For example, setting up a subfolder path like `/help` allows users to access your knowledge base directly within your domain, such as `example.document360.io/help`.

To get started, ensure you replace the example domain in the configurations with your Document360-provided domain or your custom domain.

---

### Pre-requisites

- [**Application Request Routing module**](https://www.iis.net/downloads/microsoft/application-request-routing) for IIS
- [**URL Rewrite Module**](https://www.iis.net/downloads/microsoft/url-rewrite) for IIS

---

## Setting up a sub-folder path

1. Install the [**URL Rewrite module for IIS Server**](https://www.iis.net/downloads/microsoft/url-rewrite)****
2. Install the Application Request Routing module, and ensure it is enabled.
3. Add the following rewrite rule in `web.config` to rewrite the contents from your documentation at `/help`.

```xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="ReverseProxy_HomePage" enabled="true" stopProcessing="true">
                    <match url="^help$" />
                    <action type="Rewrite" url="https://example.document360.io/v1" />
                    <serverVariables>
                        <set name="HTTP_requested_by" value="proxy" />
                        <set name="HTTP_X_ORIGINAL_ACCEPT_ENCODING" value="{HTTP_ACCEPT_ENCODING}" />
                        <set name="HTTP_ACCEPT_ENCODING" value="" />
                    </serverVariables>
                </rule>
        <rule name="ReverseProxy_DocsPage" enabled="true" stopProcessing="true">
                    <match url="^help/(.*)" />
                    <action type="Rewrite" url="https://example.document360.io/help/{R:1}" />
                    <serverVariables>
                        <set name="HTTP_requested_by" value="proxy" />
                        <set name="HTTP_X_ORIGINAL_ACCEPT_ENCODING" value="{HTTP_ACCEPT_ENCODING}" />
                        <set name="HTTP_ACCEPT_ENCODING" value="" />
                    </serverVariables>
                </rule>
        <rule name="ReverseProxy_API" enabled="true" stopProcessing="true">
                    <match url="^api/(.*)" />
                    <action type="Rewrite" url="https://example.document360.io/api/{R:1}" />
                    <serverVariables>
                        <set name="HTTP_requested_by" value="proxy" />
                        <set name="HTTP_X_ORIGINAL_ACCEPT_ENCODING" value="{HTTP_ACCEPT_ENCODING}" />
                        <set name="HTTP_ACCEPT_ENCODING" value="" />
                    </serverVariables>
                </rule>
            </rules>
            <outboundRules>
                <rule name="RestoreAcceptEncoding" preCondition="NeedsRestoringAcceptEncoding">
                    <match serverVariable="HTTP_ACCEPT_ENCODING" pattern="^(.*)" />
                    <action type="Rewrite" value="{HTTP_X_ORIGINAL_ACCEPT_ENCODING}" />
                </rule>
        <rule name="RewriteLinksToSourceDomain1" preCondition="ResponseIsHtml">
                    <match filterByTags="None" pattern="^https://example.document360.io/(.*)" />
                    <action type="Rewrite" value="https://example.com/{R:1}" />
                </rule>
        <rule name="RewriteLinksToSourceDomain2" preCondition="ResponseIsHtml">
                    <match filterByTags="None" pattern="&quot;/help&quot;" />
                    <action type="Rewrite" value="&quot;/help&quot;" />
                </rule>
        <rule name="RewriteLinksToSourceDomain3" preCondition="ResponseIsHtml" patternSyntax="ECMAScript">
                    <match filterByTags="A" pattern="(.*)/docs/(.*)" />
                    <action type="Rewrite" value="/help/{R:2}" />
                </rule>
                <preConditions>
        <preCondition name="ResponseIsHtml">
                        <add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
                    </preCondition>
                    <preCondition name="NeedsRestoringAcceptEncoding">
                        <add input="{HTTP_X_ORIGINAL_ACCEPT_ENCODING}" pattern=" .+" />
                    </preCondition>
                </preConditions>
            </outboundRules>
        </rewrite>
    </system.webServer>  
</configuration>
```

The `web.config` file is located in your IIS root directory. Make sure to back up the file before making changes.

> [!NOTE]
> ** NOTE
> 
> - If you are on KB Site 2.0 and wish to host your Knowledge base as a subfolder, you have to define the **Subfolder path** as well as the **Site API path**.
> - Replace `/docs` and `/api` with the exact values configured under **Subfolder path** and **Site API path** in the Document360 portal.

---

## What happens next?

Once you have successfully configured the web server, your knowledge base site will be live in your custom subfolder/subdirectory.

However, the existing URL for your project will serve the requests.

> **For example,** `example.document360.io` and `example.com/help` (if `/help` is your folder path) will point to the Knowledge base site.
> 
> Remember to replace `example.document360.io` and `example.com/help` with your domain. For example, `yourcompany.document360.io` and `yourcompany.com/help`.

This will cause duplicate content in Search engines (Google, Bing, and more). To prevent this, you will need to enable a URL redirect. Enabling a URL redirect prevents search engines like Google or Bing from indexing duplicate content, which can negatively impact your site's search rankings.

> [!NOTE]
> ** NOTE
> 
> To enable the redirect from `example.document360.io` to your custom subfolder `example.com/help`, please contact us at [**support@document360.com**](mailto:support@document360.com).

---

### FAQs

****What is Internet Information Services (IIS)?****

IIS is a flexible, secure web server created by Microsoft for hosting websites, applications, and services on Windows. It supports protocols like HTTP, HTTPS, FTP, and more, making it widely used for web hosting and application deployment in Windows environments.

****What is the Application Request Routing (ARR) module?****

The ARR module is an IIS extension that enables load balancing, routing requests to different servers based on rules, and improving application performance.

****What is the URL Rewrite module in IIS?****

This IIS module allows you to create rules for modifying URLs, enabling custom paths for accessing content, and seamlessly redirecting users.

****What is the purpose of the**`web.config`**file in IIS?****

The `web.config` file stores configuration settings for applications running on IIS, such as URL rewrite rules, security settings, and server behavior.

The public-facing website where end-users can access articles and find answers to their questions.
