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


So You?re Hiring a Web Designer?You Have the Right to Demand these 7 Perks

Whether you're hiring a designer who has created 10 sites... Read More

Images: How To Make Them To Load Fast On Your Web Pages?

1. Use .gifs rather than .jpgs. GIFs are smaller in... Read More

Digitalize It! : (Modification of images with tools such as Adobe CS and Corel)

Then it was a choice among crayons, paints and palettes... Read More

Small Business Website Design - How to Get Professional Results on a Shoestring Budget

Just because you are a small business with an even... Read More

7 Ways of Building Customers Trust With Your Web Site

When I purchase something from a web site I first... Read More

Color Psychology in Marketing

On the internet we don't deal with face to face... Read More

Web Crimes: how to avoid common website design mistakes

Thinking about designing your own website? Think again about adding... Read More

Creating a Favicon

Once, I attempted to create a favicon (the little graphic... Read More

Great E-Cover Creation in 5 Steps

There are several graphic software packages available to help you... Read More

Choosing Your Web Design

We would all like to have the best looking website,... Read More

12 Essential Web Site Design Tips

1. What's the purpose?The most fundamental thing to do before... Read More

Web Design - 7 Key Things to Avoid

A search for "web design" on Google returns more than... Read More

6 Design Flaws Newbie Web Designers Make: Fool Everyone Into Thinking You Know What Youre Doing

Even if you're not an accomplished webmaster you can still... Read More

Do Your Website Yourself - 4 Simple Steps to Get Your Dreams on the Web

Many people hire professional web site designers for as much... Read More

8 Tips for Designing a Great Website

Square buttons, round buttons, flashy buttons ? will they match... Read More

10 Important Web Design Tips: SEO Friendly Website

A website should firstly be searched out by visitors before... Read More

Got Web Traffic but Still Low Sales? Ten Ways to Selling Success - Part 1

Have you put a lot of effort, time, and money... Read More

Wording Up Your Website

Back to basics. Forget funky design, good copywriting is the... Read More

Top Ten Website Design Secrets for Internet Marketing Success

When it comes to marketing your website, you should really... Read More

Tableless Web Designs: Why I Switched

Since I made the switch 6 months ago to a... Read More

How Do We Know When Its Time To Redesign Our Web Site?

A question we frequently get asked is, "how do we... Read More

Hiring a Graphic Designer

You've come up with a great product. You've got the... Read More

Creating Quality Websites

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

Website Design: Redecorate Your Web Site To Increase Sales

Getting traffic to your website is not the only factor... Read More

How to use Emotional Content to Increase Visitor Response

Did you know that many folks make "buying decisions" when... Read More

How to Create a Great Landing Page for Your Website

The landing page or entry page of your visitors is... Read More

10 seconds is all it takes? (How to grab the attention of your audience with your web site)

FACT: 30 to 60% of visitors tend to drop off... Read More

How to Get Your Visitors to Create Content for Your Website

An ongoing challenge for webmasters today is to provide fresh... 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 Coach Tip: The Single Most Important and CRUCIAL Element of Your Web Site

Here's the single most important part of your website: YOUR... Read More

20 Tips to Creating a Profitable Website

As an online Entrepreneur you require a successful website.One that... Read More

How to Choose a Website Design Company

The internet is full of web design companies pleading for... Read More

Custom Website Design - 7 Steps to a More Professional Website

If you are trying to sell a product or service... Read More