If you want to learn more about web design and development, installing Internet Information Services (IIS) on your Windows 10 computer is a good method. IIS is a free Windows feature included with Windows 10, so why not use it?
IIS is a full featured web and FTP server with some powerful administration tools, robust security features, and can be used to host ASP.NET and PHP applications on the same server. You can even host WordPress sites on IIS.
There are three ways to install and configure a website in IIS on Windows 10; using a graphical user interface (GUI), PowerShell, or Windows CMD. We’ll be using each method for a basic installation of IIS.
Install IIS using the GUI
This is a point-and-click method for creating a website in IIS. This is ideal if you are not familiar with PowerShell or Windows commands.
- Start typing “include windows” in the search bar. This will display a utility to enable or disable Windows components. Click on it.
- The Windows Components window will open. It may take some time for various functions to load. Once this happens, check the box next to IIS and click OK.
- The installation will begin and may take several minutes. When finished, click the Close button.
- To verify that IIS is installed and running, type IIS in the search bar next to the Start button. As a result, you will see Internet Information Services Manager. Click on it to open it.
- When IIS Manager opens, look at the left pane of the window under Connections. Expand the tree menu until you see the default website. This is a placeholder site that is installed with IIS. Click on it to select.
- On the right side of IIS Manager, find the Browse Web Site section. Click Browse *: 80 (http). Your default browser will open the default website.
- You will see the following web page. Note that the address bar says localhost. This is the address you need to enter in order to visit your new website.
Create your first web page for IIS
Before we move on to two other ways to install IIS, let’s take a look at where the files that make up your website are stored. We’ll also make a very simple web page. Once you know how to do this, you will know the basics to get started with learning web design and development.
- After installing IIS, open Explorer. Go to C: intepub wwwroot folder. This is where the files that make up the website should be stored. You will see the default IIS web page file, iisstart.html, and the image shown on the page, iisstart.png. This is where you will save your first web page.
- Open Notepad as administrator. To save to the wwwroot folder, you must be an administrator.
- Save the file in the wwwroot folder. Name it index.html and change the Save As type to All Files. Then click the “Save” button.
- Now that it is saved as the correct file type, let’s put some content in it. Enter the following HTML for a very simple web page and save it:
- Return to your web browser, which has the default IIS web page. Click on the update button. You will now see your first web page.
This is it! You have just created and published your first website in IIS.
Install IIS using Windows Commands
We can shorten the IIS installation process to a one-line command. This can be done at the Windows command prompt or using PowerShell. We’ll show you how to do this using a Windows command first, but learning PowerShell will be of great benefit in the future.
- Enter cmd in the search bar and the top result is command line. Click Run as administrator.
- Type DISM / online / enable-feature / featureName: IIS-DefaultDocument / All and press Enter.
- A progress bar appears. When it reaches 100.0%, you will see the message “Operation completed successfully”. you can close the command line. IIS is installed.
- Verify that you can open IIS Manager and that the installation was successful by following steps 4-7 in the Installing IIS Using a Graphical Interface section.
Install IIS using PowerShell
Learning to do things like installing IIS in PowerShell is a huge advantage for two reasons. First, it is the easiest and fastest way to perform most of the administrative tasks in Windows. Second, you can save your PowerShell commands, known as cmdlets, as a script and run them anytime on any Windows machine or server.
- Enter powershell in the search bar and one of the results should be PowerShell ISE. Click Run as administrator.
- Type the cmdlet Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerRole -NoRestart and run it. You will see the beginning of a progress bar. When finished, make sure IIS is installed and working.
- This step is optional, but you can save it as a PowerShell script and then run it at any time. Work with the script and add different parameters. In the end, you will have an IIS setup script that configures everything exactly the way you want it, every time with one click.
You are the Web now!
This is just the beginning of what you can do when creating your own website in IIS. Also consider using IIS for FTP file transfer or media hosting. Also take a look at the Microsoft Web Platform Installer for easy ways to install and learn things like WordPress, PHP, Python, and more.