Create a Website
CSS Tutorial
FREE Domain!
Any web hosting you subscribe with DotEasy will get you a FREE domain name registration.
PLUS you get:
  • FREE Website Builder
  • FREE Blog
  • FREE Forum
  • FREE Photo Album
  • FREE Email Accounts
Get your FREE domain name today!
Home > Dreamweaver Tutorial
SSD Web Hosting with FREE Domain

What are Server Side Includes (SSI)?

Server Side Includes (SSI) are extremely useful, even though you may have never heard of them. SSI are web page files that contain commonly used code that can be reused by other web pages in your site. In other words, an include file contains code that you would like to reuse. In fact, the header and footer of this page are placed there using SSI. What SSI does is it tells the server to replace SSI tag with an include file.

How do you use Server Side Includes?

Using Server Side Includes is very easy. All you need to do is to create a web page file which contains the reusable code. Take the header in our site as an example. We make the header a web page (.html) file, and include it in all web pages. NOTE: It's important that the include file does not contain any HTML, HEAD, BODY tags. The file should only contain the code that has to be included in the file.

Once you have made the include file, all you need to do is to include it in the pages that will use this code. To explain this I will show what would happen if you had the include file saved as 'header.htm' in a folder called 'common'.

To include a SSI file from any page on your site, add following code in the appropriate place:

<!-- #include virtual=”/common/header.htm” -->

That's it. Now whenever you make a change in an include file, the change will get reflected on all other pages using this include, and you will only make change to one file instead of hundreds of web page files.

It's very easy to use Server Side Includes in Dreameaver. Once you have made the include file, all you need to do is click on "Insert > Server Side Includes", then choose the include file, and click OK. It's important to make sure the server side include file is in a path that is relavant to your SiteRoot folder.

We hope you found this Dreamweaver Tutorial helpful.

Enjoy this tutorial?

1. Link to this page(copy/paste into your own website or blog):
2. Add this page to your favorite social bookmarks sites:
3. Add this page as your favorites. (Press Ctrl+D)