site logo

How to build a simple intranet

Intranet uses the same instruments as the Internet i.e. HTML, CSS, JavaScript, but the content of intranet is available only inside a local network in the company. Content of intranet is inaccessible from the Internet. Intranet usage is similar to Internet browsing. The browser displays company information and the pages are browsed by help of links.

In this article you will not find the only one proper procedure how to build an intranet, rather you will find tips and warnings what to be careful when building intranet. For the intranet running you will need the following equipments: local area network (LAN), a web server, computers with browsers and some person who will build intranet.


Most companies have a public website with firm presentations something like that are located and registered in the Internet space. Corporate intranet should be isolated from this presentation and should run inside the company, in a local area network.

Term domain has a bit different meaning in the LAN, in the intranet. The local domain is under full control of the network administrator. User account is created for a specific person who is physically identifiable. Intranet web server can determine which account (user) requires intranet page and allow activity according to assigned user roles. For more see the article single sign, SSO.

schematic intranet diagram

From the Internet side only public address of the router is visible. Other devices of local network, their addresses, names, communication, all is hidden behind the router.

Intranet domain name is not so significant for intranet running. What is important, is the name of server where web server is installed. Enter that name in the browser address bar to get the home page of intranet.

For running intranet you do not need to register the address type in DNS. Use Windows name of machine with web server. The name can be found in context menu of this computer icon on server.

Safe remote access to the local network, thus to the intranet via a VPN (virtual private network) is possible without any restrictions. Setting up VPN server and client is not a trivial matter.

Web server

In the corporate intranet environment, where most of devices are running Windows, it is natural practice to use IIS, Internet Information Server as a web server. For testing, it is more reliable to use single machine with the installation of e.g. Windows 2000 Server and IIS6 web server. Older IIS has the advantage in very simple installation and setup. Part of the installation IIS are interprets of VBscript, JavaScript and Access database drivers that is needed for dynamic pages activity.

In principle it is possible to use any web server. The look of pages that users will see in browser depends on the quality of HTML and CSS code and it does not depend on the version of the web server. The fact that older versions of Windows and IIS is not supported does not mean it is of poor quality, it just means so much that Microsoft wants more money. It is also the biggest disadvantage of products Microsoft, once you have reached at least the basic productivity, tools are no longer supported.

screenshot of intranet directory preview

How a web server works? After clicking the link in the browser, request is sent to the web server. When web server recieves request, it looks up requested file in his directory. Static pages (extensions .htm .html) are instantly sent back to the browser. Dynamic pages (extensions .asp or .php) are first compiled on the server and the browser recieves this compiled file (response). Interpret reads step by step the code from requested file. HTML lines of code are saved in the output file, the script parts of code are executed and the result is saved in the output file. This way build-up code is sent back to the browser. Dynamic pages (scripts) are required for working with databases, and form processing. Intranet is mainly about the forms and databases.

In the screenshot on the right you can see the IIS console and expanded IIS home directory. Several intranet applications are placed in subdirectories. Description of some applications, their desription and sreenshot you can find in intranet tour section.

IIS console is useful for setting specific IIS properties which can not be set by the file manager. The same files can be seen in the file manager in directory C:\\Inetpub\wwwroot\. This is physical path to home directory of IIS web server. Access rights for that directory are to be set as read  for users, and full control  for intranet developer.

It does not matter which type of browser you select to view the intranet. If you keep the standards, pages are displayed identically in all modern browsers. Problems may occur in IE, that tends to fall into quirk mode, MS-compatible mode. In this mode box model is calculated according to rules other than those specified by the W3C.

All browsers should have preset the home page as the default page of the intranet. After browser start this page is loaded automatically and on the home page should be links to particular applications intranet.

Developmet of intranet applications

Developmet of web page is simple. Type the name of intranet server in the browser address bar and load the home page of intranet. In an ASCII editor (Notepad) open the file default.htm from the IIS server, edit the code and save the file back to the server. Then refresh the page in the browser and watch the changes. Minor code modifications can be done directly on the live application.

Developer can install the web server on his workstation and can develop applications without connecting to the LAN. Instead of the web server name type localhost in the address bar. Localhost refers to the web server on the same machine and request for a page is directed back to the machine then. The completed application (entire directory) then copy to the corporate web server, set the necessary properties of directory and add the link to the new application on the home page.

Web server on your computer can be used as personal intranet, where a web applications for your private use can run.

After some experiments you will learn the principles of Web intranet applications. It consists of a number of single files. Server scripts provides functionality of application i.e. read database, format the data into HTML table, or process the form. The look of the application is specified in cascading stylesheets and images files. Common parts of the code can be maintained in the include files. That way the web applications differ from desktop programs, where usually the entire code is compiled into a single file.

updated 2013.03.22