TechBuzzPro

Bring Back inetpub Folder? What It Is & How to Restore

· 5 min read · Apps & Browsers

In this article
  1. What Is the inetpub Folder?
  2. Why Would You Want to Bring It Back?
  3. How to Restore inetpub (Correctly)
  4. What If You Deleted a Website’s Files from wwwroot?
  5. Common Problems and Misconceptions
  6. Alternatives to Restoring inetpub
  7. Frequently Asked Questions

No, you generally should not bring back the inetpub folder unless you still actively use Microsoft IIS (Internet Information Services) on that Windows machine. The inetpub folder is the default root directory where IIS stores its websites, logs, and backup configurations; if you deleted it and you no longer run IIS, you can safely leave it gone. If you do need IIS again, the correct fix is to reinstall or re-enable the IIS role, which recreates the folder automatically — not to manually recreate it from scratch.

What Is the inetpub Folder?

inetpub is a system-created folder that appears when you install IIS on Windows (Pro, Enterprise, or Server editions; it is not present by default on Windows Home). It holds the web content and configuration that IIS serves to the internet or a local network. The typical subfolders include:

  • wwwroot — the default website’s home directory (contains files like iisstart.htm).
  • logs — IIS log files for each site, stored in W3C or IIS format.
  • temp — temporary files used by IIS for compilation and caching.
  • history — older versions of the applicationHost.config file, used for configuration rollback.

If you’ve never installed IIS, you won’t have an inetpub folder. If you installed IIS and later removed the role, the folder may remain (or be partially left behind) as a leftover.

Why Would You Want to Bring It Back?

There are three common reasons people search for “bring back inetpub folder”:

  1. You deleted it and now IIS is broken. If you removed the folder while IIS was still installed, IIS may fail to start or return errors like “Cannot find the site” or “The service cannot start.”
  2. You accidentally deleted a website’s files that were stored inside wwwroot and you want to recover them.
  3. You’re following an old tutorial that assumes inetpub exists, and you’re trying to locate it for a web project.

Only the first reason requires you to actually restore the folder. The second is a file recovery issue, and the third simply means you haven’t installed IIS yet.

How to Restore inetpub (Correctly)

The safest and most reliable way to bring back inetpub is to let Windows recreate it for you. Do not manually create the folder and copy random files into it — that will not fix IIS and may cause permission problems.

If IIS is still installed (but the folder is gone):

  1. Open Control Panel → Programs → Turn Windows features on or off.
  2. Uncheck Internet Information Services and click OK. This removes the IIS role.
  3. Restart your computer (recommended, though not always required).
  4. Re-open the same dialog, re-check Internet Information Services, and click OK.
  5. Windows will reinstall IIS and recreate the inetpub folder with default permissions and subfolders.
  6. This method works on Windows 10/11 Pro and Windows Server. On Server, you can also use PowerShell: Remove-WindowsFeature Web-Server then Install-WindowsFeature Web-Server (run as Administrator).

    If IIS is not installed:

    Simply install IIS via the same “Turn Windows features on or off” dialog. The inetpub folder will appear automatically at C:\inetpub (or on the drive where Windows is installed).

    What If You Deleted a Website’s Files from wwwroot?

    If you only deleted the contents of wwwroot (like your actual site files), you don’t need to restore the whole inetpub folder. You need to recover those files. Check the Recycle Bin first. If they’re not there, use a file recovery tool (like Recuva or PhotoRec) immediately, and stop writing new data to that drive to increase chances of recovery. For future safety, always keep backups of your web content outside the inetpub folder.

    Common Problems and Misconceptions

    • “Can I just create C:\inetpub manually?” You can, but IIS will not use it unless you also configure the site’s physical path to point there. And without proper permissions (IIS_IUSRS), you’ll get 401 or 403 errors.
    • “Is inetpub a virus?” No. Some malware uses similar names, but the legitimate folder is created by Windows. If you see it on a fresh system where you never installed IIS, that’s unusual — but not necessarily malicious. Check its path and contents.
    • “Can I move inetpub to another drive?” Yes, but you must change the site’s physical path in IIS Manager and also update the log and temp directories if you want them moved. Simply dragging the folder is not enough.
    • “Why is inetpub so big?” Usually it’s the logs folder. Logs grow over time. You can clean old logs or change log settings in IIS to limit size.

    Alternatives to Restoring inetpub

    If you don’t need IIS anymore, you don’t need inetpub at all. Many developers use lightweight alternatives like Apache, Nginx, or built-in development servers (e.g., python -m http.server) that don’t create such folders. If you’re just testing static HTML, you can serve files from any folder using those tools. If you need a full web server on Windows, IIS is one option, but you could also run Linux containers or a virtual machine with a different stack.

    Frequently Asked Questions

    Will deleting inetpub break my Windows?

    No, deleting the folder itself won’t break Windows. It only breaks IIS if IIS is still installed and configured to use that path. Windows core files are not stored there.

    How do I check if IIS is installed?

    Press Win + R, type inetmgr, and press Enter. If IIS Manager opens, IIS is installed. If you get an error, IIS is not installed or is broken.

    Can I restore inetpub from the Windows installation media?

    There is no standalone inetpub folder on the installation media. The folder is generated during IIS installation. Reinstalling IIS is the proper method.

    Why did inetpub disappear after a Windows update?

    It shouldn’t disappear from an update alone. If you uninstalled IIS at some point, the folder may have been removed. If it vanished without you uninstalling IIS, check if the IIS service is still running (services.msc → World Wide Web Publishing Service). If it’s stopped, start it — the folder may still exist but be hidden or moved.

    Is it safe to delete inetpub if I don’t use IIS?

    Yes, it’s safe. It’s just a data folder. However, if you ever install IIS in the future, Windows will recreate it. There’s no benefit to keeping it if you don’t need it.