Skip to main content

Howto Run Your HTML Static Website Locally In IIS On Windows PC


As a developer many time you may wish if you could run your static HTML website locally on your computer (Windows 7, Windows Vista, Windows XP, Windows 2008).

Although with Static website, you could easily download and double click the index.html or home.html file to open and run other pages. But this will not give you the real world senario. For example you will not able to use a path like /images/home-page-banner.jpg. You will have to use a relative paths like ../images/home-page-banner.jpg.

Following are very easy steps to do so. These steps are for Static HTML website. I will also post steps for more advance websites that uses ASP, ASP.NET, Dotnetnuke etc and uses database server.



1. IIS Server installed on your local machine

2. FTP username, password to download files form your FTP server

3. Administrative rights on local machine. Many task will display messages requesting Administrative privilege to run the task. 



1. Download files form Web Server

2. Installing IIS Server

3. Configuring website in IIS server, Add DNS in local Host file

3. Running the site

4. Troubleshooting


1. Downloading Files From Web Server

1. Download & Install an FTP Client. I like FileZilla which could be downloaded from

2. Open Filially & Site Manager using Menu File->Site Manager.

You will need FTP Host address, Username, password. You will need to login to your hosting account to find these 3 information or call customer service.


3. After entering about details click Connect. FTP will be connected and you will see few boxes in the FileZilla.

Top box for connection status and error messages

Left side box will display your computer files just like Windows Explorer while right side box will display your web server files.


Depending upon your hosting, you will find different folder naming. In Linux hosting you will find a folder name htdocs which will have all your files that runs the website. Html, images, css, JavaScript, document etc.

4. Create a folder in your local machine (lets say c:\LocalWebsite)

5. In the right side window, select all folder & files inside htdocs folder. You can do this by selecting htdocs in upper box (folder view) and then press CTL+A in the lower box (folder & files view)

6. Drag & Drop all the selected files from right side lower box to left side lower box. TAKE ALL PRECUATIONS during this step and DO NOT drop folders & files any ware else then the left side lower box. It will take few min to few hours depending upon the size of your files over web server.  



2. Installing IIS Server

Windows XP –>

1. Start –> Control Panel –> Click at Add or Remove Programs.
2. Click Add/Remove Windows Components. This will display The Windows Components Wizard.
3. Follow the Wizard to install IIS (Will post screenshot if needed. Let me know via comment)

Windows Vista, Windows 7 –>

1. Start –> Control Panel –> Click at Programs and Features

2. Click at Turn Windows feature on or off in the left side bar

3. This will display the Windows features screen. Select Internet Information Services, World Wide Web Services and few other checkboxes as shown in following screenshot. for the current task you don’t need most of them but I anyways shows you what I normally select.


Windows 2008, Windows 2008 R2

Follow the steps listed in my other post –> Windows Server 2008 - Add Role - Web Server IIS


Configuring website in IIS server, Add DNS in local Host file

Adding DNS in local Host file

1. Open Notepad using Run As Administrator Option and then open your local host file which is located at C:\Windows\System32\drivers\etc\hosts.

2. Enter the DNS entry for your local website and save. Following are some sample DNS names


Configure IIS – Windows Vista, Windows 7

1. Open IIS Server: Start –> Control Panel –> Administrative Tools –> Internet Information Services (IIS) Manager

2. In the IIS expand the left side tree –> select Sites –> Right Click –> New  Site. It will display Add Website screen. Enter the name you have added in the Host file


3. Click Ok


Running The Site

1. Open IE, Firefox Or Google Chrome

2. Type the DNS name that you enter in your local Host file and used when creating IIS website

3. Your website should comeup. You can make changes in files located at c:\localwebsite folder to try.




Remember to open Notepad using Run As Administrator Option and then open your local host file. 


  1. This article aims to describe the differences between a static website and a content managed website using a content management system by describing the benefits and disadvantages to SME's (small and medium sized enterprises.) Online Marketing

  2. Any web master would always want high traffic for his web site. After all, traffic can help build a community, increase sales, and increase web site conversion. As such, every web site owner practically does what it takes to get high traffic. Read More

  3. Any web master would always want high traffic for his web site. After all, traffic can help build a community, increase sales, and increase web site conversion. As such, every web site owner practically does what it takes to get high traffic.

  4. A great and important information you have shared with me as i love to use p.c and mostly essaytigers students review required PC and internet so these types of posts are very important for me so i really find your post very important because all the informative articles are very important and i really like to read them on daily basis.

  5. Well, you should know that actions such as the ones mentioned above could be responsible for the damaging of your Windows registry.

  6. Showbox is one of the best apps among all the others which provide streaming of movies and tv shows.
    The best part is, it is absolutely free for everyone and it also provides multiple resolutions of the videos.
    You can also watch the videos even when you are offline ShowBox for iOS

  7. The more loan specialists you take a gander at, the more probable you are to locate a honest to goodness moneylender with a reasonable rate. Cash Advance

  8. Before you apply for any payday credit, you ought to search out organizations that are positioned well and that are unguarded with the expenses and rates they charge. Avoid organizations who make it hard to discover the charges related with their advances. Continuously make a point to make your installments on time or to make plans previously in the event that you are not ready to make an installment. Check Cashing


Post a Comment

Popular posts from this blog

SharePoint WebPart Error - Unable to add selected web part (s) – MOSS 2007

ISSUE: Recently I faced this issue that when I try to deploy my WebPart.  Unable to add selected web part(s). WebPartName: Cannon unregister UpdatePanel with ID ‘ctl00RTMPanel’ since it was not registerd with the ScripManager. This might occure if the UpdatePanel was removed from the control tree and later added again, which is not supported. Parameter name: updatePanel.   I faced this issue twice and both the time the issue was not what display here. This could be sure to any error in the WebPart. Following are list resolution from multiple instances.   RESOLUTION: 1. Check the WebPartName.webpart file. Check whether you have a proper PublicKeyToken value. When I face the issue the value was PublicKeyToken=$PublicKeyToken$. If you have used WSP builder then in the Visual Studio you will find this file at \WebPartsProject\12\TEMPLATE\FEATURES\WebPartName\WebPartName.webpart. Sometime when you create a new WebPart using WSP builder then you do not get

TIME – 25 Best Blogs of 2009

Every year Time makes a list of best blogs in the world. They chose 25 blogs from millions of blogs in the world, spanning politics, housekeeping, astronomy and everything in between. Below if a direct link to the TIME website for the list. I also copied it to easy comparison of last year best with this year best blogs.   25 Best Blogs of 2009     25 Best Blogs 2008   25 Best Blogs of 2009 Talking Points Memo The Huffington Post Lifehacker Metafilter The Daily Dish by Andrew Sullivan Freakonomics BoingBoing Got2BeGreen Zen Habits The Conscience of a Liberal: Paul Krugman Crooks and Liars Generación Y Mashable Slashfood Official Google Blog synthesis bleat /Film Seth Godin's Blog Deadspin: Spor