Fitting the Pieces Together for a Great Website

  Read this newsletter online

Issue #007- Using SSI and Avoiding the PDF Trap


Techie Stuff- Using Server Side Includes (SSI) and Fixing .PDF Files

We are going to get just a little bit techie this week with a brief tutorial on how to use Server Side Includes on your website (SSI). If you can understand HTML, you can understand SSI. It's a great way to manage the elements of your pages that are repeated throughout your site. If you don't need this tutorial now, file it away for later- you'll find it hard to fathom how you maintained a website without it!

My contributing author today is Craig Geis, SEO guru of The Karcher Group and all around helpful guy. Craig's article touches on the importance of making your .pdf files friendly to web surfers.

Fast Links


Let's get started! -Scottie

puzzle divider

Web Site Usability Testing

Traffic low? Are clicks computing to sales? Web site usability reviews by Cre8pc could mean the difference between sales or no sales. You choose the plan that fits your budget.

puzzle divider

Simple Server Side Includes

By Scottie Claiborne © 2004

Anyone who's ever had to change a multitude of static pages on a site knows what a pain it is to find and change the same snippets of code on one page after another- even using an HTML editor's find-and-replace function can be cumbersome since you have to upload all of the pages to the server again with the new code. Sometimes a page or two will get missed or the find-and-replace function replaces some things you didn't intend to change, so it requires some quality-checking time to run through all the pages and make sure the changes are there.

An easier way to manage pages in your site is by replacing chunks of repeating code, such as your navigation links, with server side include (SSI) files. Instead of repeating the same code over and over, you create a separate file with just that chunk of repeated code in it, then place a line of code on each page that tells the server to insert the contents of a separate file into that spot on the page.

When someone visits your page, the server scans the code, pulls in the files needed to assemble that page and returns the page as a single, complete page to the browser. Your "includes" code is replaced by the contents of the file the code called. Since this all happens on the server's side of the transaction, your visitors don't need to have any special browsers or plug-ins in order to make this work; SSI returns a "normal" html page to the browser.

SSI files can simplify the maintenance of your site. Information that may change from time to time or that replicates across many pages can be replaced with SSI files. Then, when you alter that include file, every page on your website changes where the included file is being read. You will find include files often being used to replace the entire header and footer for each page. When set up as includes, the background color, graphics, navigation, or copyright information can be changed across the entire site by altering the include file for that information. Without includes, you would be forced to go through all your pages to make the necessary changes.

You can use as many includes files on a page as you need- you can also call different includes files for different pages. A good example is subnavigation links that only appear on certain pages, you only call that include file where it's required. Any block of code in your site that repeats across pages is a good candidate for SSI.

The format for the code you will use to include a file within an HTML page will depend on the operating system of your server. For most sites, this will mean either Windows or Unix/Linux. If you are using Windows, you'll be changing your file extensions to .asp. For Linux/Unix systems, you will use .php extensions. You should check with your web host or server administrator if you are not sure what platform your site is hosted on.

Here are the two standard file include methods for both Windows and Linux systems (Note: you must use the proper file extensions [.asp or .php] in order for these functions to work.) Remember, the included file will process just as regular HTML; all you are doing is splitting your pages into manageable parts for easy editing and maintenance:

Windows (.asp)

<!--#INCLUDE FILE="header.asp"-->
1. Create a file called header.asp that only contains the code that you want to include.
2. Include the file with the above code in the place where the code should appear on each page.
3. Name all files with a .asp extension.

Linux/Unix (.php)

<? include("header.php"); ?>
1. Create a file called header.php that only contains the code that you want to include.
2. Include the file with the above code in the place where the code should appear on each page.
3. Name all files with a .php extension.

In both cases, relative paths can be determined as in HTML, such as:
<? include("../header.php"); ?>

or you can use an absolute (full) path, which is ideal for sites that have multiple levels of folders in their structure:
<? include("http:www.site.com/header.php"); ?>

Changing the extensions of your pages can be a temporary headache, especially for established sites but in the long run, the ease of maintaining and changing the site is worth the effort. Before changing page extensions, be sure to have a custom 404 error page in place. (Most hosting packages today offer custom 404 page tools in their control panels- contact your host if you don't see an option in your hosting control panel.)

SSI gives you the flexibility of a framed site without all the usability issues that come along with frames. It allows you to separate the page content from the structure and graphics, giving you the freedom to easily change any consistent element of the site without a major hassle. It's worth changing existing sites and should definitely be considered when planning a new site.

Scottie Claiborne is the owner of Right Click Web Consulting and the facilitator of the Successful Sites Newsletter. She is a speaker at the Search Engine Strategies conferences and the High Rankings Seminars as well as the administrator of the High Rankings Forum.

puzzle divider

Search Engine College

Time for school! What the best way to learn search marketing? From the experts! Kalena Jordan has launched Search Engine College with expert instructors such as Karon Thackston and Bob Goldstein. Sharpen your pencils and get ready to learn.

puzzle divider

Search Engine Results and the PDF User Trap

By Craig Geis, The Karcher Group © 2004

Many major search engines now have the capability to index PDF files created by Adobe Acrobat and return them in search results. If you are a Web site owner with PDF files on your site, this is good news.

What you may not know is that this capability presents potential usability problems, expecially for searchers. What is the big deal? Let's find out…

Searching for "blessing of a Christmas tree" on Google returns a link to a PDF file as the first result:

Search for BLESSING OF A CHRISTMAS TREE

If searchers click on this listing, the link automatically opens a PDF file with no navigation to the main site. Users are trapped! They have no way to explore other pages of the site for more information.

So, what's going on and, more importantly, how to do we fix it?

Essentially, the PDF format is not the culprit; the real problem is the author's failure to create the files with Web users in mind. This is not unusual since pdf files are often documents created for other media and not specifically for the web.

PDF authoring software, such as Adobe Acrobat 5.0, offers the ability to include both a navigational structure and hyperlinks on a PDF page. This will allow users who land on this page from a search engine to continue to navigate the site. Whenever possible, use the built-in capability of the software to add navigational elements before publishing the document.

Ideally, the best solution is to create your pages in HTML, rather than PDF format. If the information contained in the pdf files is very popular or highly requested, consider making the effort to convert them to HTML for best results.

Depending on the purpose of the document, a PDF format can be preferable. For example, PDF files offer better functionality for pages that are highly structured and commonly printed, such as application forms and price lists.

To fix the PDF USER TRAP, you will have to republish your files, adding some type of navigation structure and/or link back your main Web site. An easy way to accomplish this is to add a footer to the bottom of each page that includes a link back to the home page.

Often the pages published as .pdf files were never intended to receive traffic from the search engines in the first place. If you have .pdf files on your site you do not want to be accessible to the search engines, the best solution is to place all of your PDF files in a single folder and do a robots exclusion.

Don't overlook the potential traffic from your .pdf files. Take a few extra steps to help users continue on to your site and you may be surprised and pleased by the results.

Craig Geis is the search engine specialist for the The Karcher Group, a full-service web design and marketing company based in Canton, OH.

puzzle divider

Wrap Up

Yeah, ok, so I didn't get this edition out on time... It was mostly finished when I realized I needed to finish packing and I thought I'd finish it while waiting in the airport... and well, it just didn't happen.:-(

London was great though! I had fun bumming around with two of my best buddies Christine Churchill and Jill Whalen and seeing the sites...so much to see and do. Oh, and the conference was a good one as well...

The greatest thing about SEO conferences is finally getting to meet some of the people from the forum that I "talk" with on a daily basis, like Alan Perkins, Old Welsh Guy, BrianR, and RobWatts as well as getting to chat with other people in the industry like Barabara Coll(Webmama), Jim Banks(WebDiversity), and Ammon Johns(Black Knight). It's great to hear different views on industry topics as well as putting faces and voices to the personalities that come across so clearly online.

A great trip, but man, do things ever pile up! Time to get back to work.

Have a good one! -Scottie

Have a Specific Question About Today's Articles?

Do you wish you could get a little advice on a specific issue about your site? Come on over to the High Rankings Forum and ask me or any of the other super helpful moderators or members. You'll find Craig Geis under the name Think Web at the High Rankings forum.

puzzle divider

Unsubscribe/Subscribe
If this issue of Successful Sites was forwarded to you, and you’d like to have your own free subscription, just visit http://www.successful-sites.com/register.php.

Successful Sites is a double opt-in list. This means that you had to subscribe and then also confirm your intent to join our list. We never send unsolicited email. To unsubscribe see the information below.

Successful Sites * PO Box 2814 * Irmo, SC * 29063 * newsletter@successful-sites.com


© 2004 Right Click Webs. All Rights Reserved.
Website Design: DianeV. Web Design Studio