Using Server Side Includes to Simplify Your Web Design

An "include" file is a piece of code that can be put into a seperate file -- for example -- your navigation bar -- and then "included" in a number of other pages. This has the very useful advantage of allowing you to retain consistency over a very large number of pages, and then make changes to all of those pages by just changing the include file.

For instance, say you want each page in your site to include a short paragraph that uniquely identifies your site. I normally call this a "site-id". It would read something like this:

ForSaleTours.com - provides information and sources for virtual tours for the real estate industry. We explain different methods of combining video and audio to produce virtual representations of your home to enhance its value and to make the purchasing experience of potential buyers better than it otherwise might be.

To set this up so it appears in a host file as an "include", you normally have to do three things:

1. Make sure your server allows SSI (server side includes). If you have access to your web site control panel you should be able to figure this out. Or if not, ask your web host technical support people.

2. Create a "host" file and give it a file extension so your server recognizes it contains include files. A common extension is .shtml

3. Create your include file. It can usually have any of a number of different extensions: .html, .htm, .php, even .txt. This is the file that will be included within other files.

4. Embed the correct code within your .shtml file to point to the include file. If the include file and host file are in the same folder on the server, it will look like this:

<!--#include file="file_name.html"-->

If the include file is located in a different folder (on the same server), the code will look like this:

<!--#include virtual="folder_name/file_name.html"-->

In the above example you have to make sure the relative path to the include file is set correctly.

Now when you want to make a global change to, for instance, your "site-id", you just have to change the include file (once), and this change will be populated through all the pages that include that file.

Include files can be put to many creative uses that allow you to do things that are otherwise very impractical. And if you have a website with a large number of pages, this technique can save you a great deal of time.

For more web design and online marketing tips see the Linknet Marketing Resource Library

Rick Hendershot is a marketing consultant, writer, and internet publisher who lives in Conestogo, Ontario, Canada. He publishes several websites and blogs, including The Linknet Network of Websites. This network provides an inexpensive way to advertise your website, and get as many as 100 low cost links.

In The News:


pen paper and inkwell


cat break through


Creating Quality Websites

Websites, there are literally billions of them out there in... Read More

How to Chose Stock Photography for your Web Site

So you've decided to take the plunge. You know that... Read More

How to Make Effective Use of Web Fonts

Writing for your web site is not the same as... Read More

Web Design for Ecommerce

Your website is your tool for showing the online community... Read More

Bad Web Design: ActiveX

ActiveX uses an interesting method for enforcing security ... it... Read More

Free Online Tools to Design (and Maintain) Your Website

These days, it seems that everyone has a website. Unfortunately,... Read More

Why Dot-Coms Fail - a Webmasters Perspective

Everyday we hear that another company goes out of business.When... Read More

Copy Editing: 10 Powerful, Mind Blowing Secrets For Writing A High-Impact Ad

No matter what product or service you're promoting, unless you... Read More

Website Savvy: 10 Key Steps to Turn Your Customers ON!

"How to turn "slightly interested" customers into "I've got to... Read More

Breathe New Life Into Your Half-dead Website By Using Words That Sell

This article may come as a surprise to you.Especially since... Read More

Website Registration Roadmap - How to Create Your Own Website in 7 Easy Steps

Creating your own website is actually easy in today's world... Read More

Leave Those Links Blue!

Don't mess with those links! When you're designing your site,... Read More

Your Website Could be Letting You Down

A professionally presented business website is a powerful and essential... Read More

How To Create A Homepage That Works

Want to know what the worst thing to say on... Read More

Web Marketing: Design Mistakes That Drive Customers Away In Droves

They may look cutting edge, but if you want a... Read More

Be Inspired to Create Better Websites

Being a writer, when I was asked to do some... Read More

Web Page Building for Beginners 2

A search engine robot actually reads the wording on your... Read More

How To Boost Your Chances at Having a Successful Web Site

New Web sites are springing up online by the millions.... Read More

Should I Use Pop-Up Ads?

Web advertising has taken many forms, including those that appear... Read More

Is Your Website?s Copy Up to the Mark?

The Internet is a relatively new medium. What works for... Read More

Dont Lose The Sale In The Internets Last Three Feet

In retailing there is a saying that sales are made... Read More

Web Designers Beware!

As a web designer, I have a personal interest in... Read More

Successful Flash Tips

Ever browse across a website that took ten million years... Read More

Keep Them Coming Back - Update Your Site

If you are anything like me, your website is a... Read More

Creating a Basic Web Design Template

A "template" is simply a design format which you can... Read More

Introduction To CGI Scripts

Using CGI scripts to add automation to your web site... Read More

How To Create A Stunning Drop Capital Effect On Your Web Pages

Drop Capitals are frequently used in many newspapers, books and... Read More

Moving Things Around

How often, men, have you come home to find the... Read More

Quality Graphics for your Web Site

For most people graphic design does not come easy. Unfortunately... Read More

Its No Good Having A Killer Product If You Dont Have A Killer Website

Read the title of this article over a couple of... Read More

Website Design Firm

Website design firms come in all shapes and sizes.When choosing... Read More

Website Maintenance: What Does it Take to Manage Your Website?

Every action has a beginning phase where you launch your... Read More

Is Your Site Too Slow? Why Image Optimization Is Critical

Graphics are fun, but if you put in too many... Read More