If you are new to Web Development then hosting a website for the first time can be very exciting and challenging task. In this blog I’ll try to show a simplified approach to hosting your first dummy website.
1. For any website, the first basic thing that we need is a web page. To keep this example simple we’ll restrict ourselves to html pages. So lets do this exercise from scratch. Open a text editor like notepad/notepad++ .
2. Now lets prepare a basic HTML page.
I’ll skip on the non mandatory decorations and focus on the core tags to make it simple and easy to understand.
1: <html>
2: <head>My First HTML Page</head>
3: <body>
4: <p>Hope it works!!
5: </p>
6: <p> It'll definitely work</p>
7: </body>
8: </html>
3. Now save this file with html extension.
4. Now your HTML file is ready so let’s test it, by opening it up in browser.
5. Nice, so you have a basic HTML file with a custom name and its opening in browser.
6. Now open IIS by Navigating from Control Panel or by typing “inetmgr” at run.
7. Select Default Website and press Explore
8. It will open a Windows Explorer and you need to copy your HTML file to that location.
9. Select Default Document and double click or press Open Feature button
10. Now add the name of your HTML file in the Default Document so that whenever the website is opened your HTML file opens as default.
Once done, Select Default Web Site on Left side pane.
11. Now Press “ Browse” as shown below in Pic.
12. It should open your Webpage in Browser hosted via IIS, alternatively you can open a browser and type in “http://localhost:80” and access your webpage.
13. Congratulations, you have hosted your first web page.