How to Bring Back the Inetpub Folder on Windows 11

If you’ve ever worked with IIS (Internet Information Services) on Windows, you know that the Inetpub folder is the heart of the default web server setup. It contains essential directories like wwwroot, where you store website files, along with logs, history files, and application data for IIS. However, on Windows 11, many users are surprised to find that the Inetpub folder is missing entirely — especially on fresh installations of Windows or systems where IIS was never activated.

If you’re reading this guide, there’s a good chance you’ve uninstalled IIS previously, reset your PC, or installed developer tools that modified the folder — and now you want to restore the Inetpub directory so you can host local sites or test web apps. The good news is that restoring (or recreating) the Inetpub folder on Windows 11 is straightforward once you know how IIS works behind the scenes.

In this detailed, step-by-step guide, we’ll explain why the Inetpub folder disappears, how to bring it back by reinstalling IIS, and how to manually recreate it if necessary. Let’s jump into the details!

Why Does the Inetpub Folder Go Missing on Windows 11?

Before we go straight to the solutions, it’s important to understand why Inetpub may be missing in the first place.

Here are the most common reasons:

  • IIS is not installed
    Windows no longer includes IIS by default — the Inetpub folder only appears when IIS is activated.
  • IIS was uninstalled
    Removing IIS will remove its directories, including Inetpub.
  • Windows reset or upgrade
    System upgrades or resets remove optional features like IIS, along with Inetpub.
  • The folder was manually deleted
    Developers sometimes delete Inetpub to clean up storage or reset configurations.
  • Permissions/software changes
    Certain tools or web app frameworks may modify the web root and remove it.

The bottom line: Windows creates the Inetpub folder only when IIS is installed, so restoring it means reinstalling IIS or manually recreating the directory structure.

With that cleared up, let’s move on to the solutions.

How to Bring Back the Inetpub Folder on Windows 11

Below are the most effective methods to restore the missing Inetpub folder. Follow them in order to restore IIS properly.

1. Reinstall IIS Using Windows Features (Recommended Method)

The simplest and most reliable way to bring back Inetpub is to reinstall Internet Information Services.

  1. Press Windows + S and search for Turn Windows features on or off.
  2. Open the panel.
  3. In the list, find Internet Information Services.
  4. Check the checkbox next to it.
  5. Expand the folder and ensure Web Management Tools and World Wide Web Services are checked.
  6. Click OK to install IIS.
  7. Wait for Windows to apply changes.
  8. Restart your PC (if prompted).

After installation, Windows automatically recreates the following folder:

C:\Inetpub\

This includes key subfolders such as:

  • wwwroot (default web root)
  • logs
  • history
  • temp directories

Once IIS is reinstalled, the Inetpub folder will be fully restored.

2. Restore Inetpub Using PowerShell (Alternate Method)

If you prefer command-line tools, PowerShell lets you install IIS with a single command.

  1. Press Windows + X and choose Windows Terminal (Admin).
  2. Run the following command:
Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerRole -All
  1. Wait for the installation to complete.
  2. Restart your PC if prompted.

This command reinstalls the entire IIS Web Server role and recreates the Inetpub directory.

3. Manually Recreate the Inetpub Folder (If You Don’t Need Full IIS)

If you simply need the folder structure (for legacy compatibility or development needs) but don’t require IIS to run, you can manually recreate the folder.

  1. Open File Explorer.
  2. Navigate to your system drive (**C:**).
  3. Right-click → New → Folder.
  4. Name the folder:
Inetpub
  1. Open it and manually create the subfolders:
wwwroot
logs
history
temp

Although this will not make IIS functional, some apps or scripts that rely on the folder structure will work normally.

4. Restore Inetpub After Uninstalling IIS (Rebuild Default Structure)

If you removed IIS previously and want to restore the exact structure:

  1. Reinstall IIS using Method 1 or 2.
  2. If you want to keep your existing configuration files, copy them into:
C:\Inetpub\wwwroot
  1. If Windows doesn’t restore your previous settings, use the following command to rebuild defaults:
iisreset /restart

This command restarts IIS and refreshes default configurations.

5. Check Permissions on Inetpub Folder (If It Exists but Isn’t Working)

Sometimes the folder is present but IIS can’t use it due to permission problems.

  1. Navigate to C:\Inetpub.
  2. Right-click the folder → Properties.
  3. Go to the Security tab.
  4. Ensure the following groups have access:
    • IIS_IUSRS
    • IUSR
    • SYSTEM
    • Administrators
  5. Click Edit to adjust permissions if needed.

Incorrect permissions can cause IIS to fail loading websites even if Inetpub is present.

6. Use DISM to Restore Windows Features (If IIS Won’t Install)

If Windows fails to reinstall IIS due to corrupted system files, use a DISM repair.

  1. Open Windows Terminal (Admin).
  2. Run:
DISM /Online /Cleanup-Image /RestoreHealth
  1. After completion, reinstall IIS again.

This restores missing components and allows Inetpub to be recreated successfully.

Wrapping Up

The Inetpub folder is a key part of IIS, but it only exists when IIS is installed or enabled. If it has gone missing on Windows 11, reinstalling IIS is the safest and most complete way to restore it. Whether you prefer using Windows Features, PowerShell, or a manual directory rebuild, there are multiple methods to bring Inetpub back to your system.

Posted by Arpita

With a background in Computer Science, she is passionate about sharing practical programming tips and tech know-how. From writing clean code to solving everyday tech problems, she breaks down complex topics into approachable guides that help others learn and grow.

X