Blog Homepage : Category - Beginner SEO
Email This ArticleAs an SEM it occurred to me recently that I tell a lot of people what to do with their sites, however like most SEM’s I don’t usually tell them how.
Our industry has grown to the point where many of us are merely consultants. We recommend adding feeds or tags or blogs to their site yet we rarely tell them how to do this.
Therefore I decided to start providing some how to articles. And as my first how to I will explain a couple ways to use includes to make site management a little easier.
I recently launched a site that I hope will make money for me one day. It’s not that I expect to make money on it, nor do I rely on the fact that it must make x dollars per month to survive.
It was more of an experiment in web design and optimization from the ground up. It wasn’t until I was committed to the project and actually building the site that I realized that it could be more than a test bed. It could actually be a viable web business.
With that in mind I shifted focus a bit and went back to the drawing board to make it a little more effective.
Two things I know about the current search landscape: They like links and they like content. I’ve talked about links before but I haven’t really touched on content – namely how do you manage content?
Sure you could go the CMS route – in fact I tried that with version 1 of my site, but I found the CMS I chose to be too restrictive.
So when I determined that I did indeed want to try and make a little extra cash I went back to the drawing board and said “what the heck, let’s make a truly static site.”
So that’s what I did, I took my template out of the CMS and made a completely static HTML site. Of course there are some database driven parts – the forums and the blog – but for the most part, the bulk of the site is static.
No I knew there would be management issues with a static site so I determined one way to properly manage my new content (articles and stories) would be to create includes for the site navigation. That way, when I added or changed content, I could simply modify an include or two and have that affect the whole site.
So that’s what I did – the pages are basically comprised of a series of includes. My main banner is an include (in case I want to rebrand the site at some point) and my main navigation is an include (because there are sections of the site which I don’t have content for but have planned to add at a later date).
Even my side navigation is in a series of includes. I’ve done this because as I add content to various sections of the site I change 1 of the includes to reflect a link to the new content.
For example, in my information section of the site I have 3 includes – the top one is the navigation up to the info section, the middle on actually includes links to the information pages, and the bottom one is the rest of the left side navigation.
This way when I add a new article, I merely change the middle include to reflect it, and every information page gets new navigation. I found this the most effective way for me to manage my completely static site.
I even have included the footer of the site, and a blank include on the right side of the content for future consideration, such as Google AdSense or other advertising potential.
How includes work
As the name implies, you use includes to include content into web pages.
Includes can be for many things such as navigation, as I’ve illustrated here, but also content, images, or anything else you’d like to include into your page.
Basically an include is just another page. In my case I created HTML pages for the navigation. They have most of the typical HTML elements you are used to minus a few exceptions.
You don’t use <HTML> or <HEAD> tags in your includes, because these will be carried into the page that requests the include. All you want is the content required to display what you want. If it’s just a list of items, then the page should start with the HTML required to build the list.
Also, unlike regular HTML pages, you won’t close out the the page with </BODY> or </HTML>. Again, these pages are “pulled” into the requesting page and their code is interpreted as part of that page, so it could cause browsing issues if there are duplicate <HEAD> <BODY> or <HTML> tags.
Once you’ve got your includes built, it’s time to add them to your pages
Adding includes to your pages
So, let me show you how I added the includes.
It’s really simple really. My site is hosted on Fedora and Apache, so the include code looks like this:
<!--#include virtual="/inc/mainnav.html” -->
It’s ok to use the comment tags in the HTML source of your site. As long as it’s configured to accept includes then the webserver will know to replace that commented code with the file contents specified.
The code needed to allow includes goes into your .htaccess file:
Options +Includes
AddType text/html .html
AddHandler server-parsed .html
In other words, my webserver knows to replace: <!--#include virtual="/inc/mainnav.html” --> with the contents of the mainnav.html file. The output then will be a combination of the two files.
You can also do includes in a Microsoft/IIS website. And if you use Frontpage for editing it becomes even easier.
The code to include such content is as follows:
<!--webbot bot="Include” U-Include="page.htm” TAG="BODY” -->
You can also use PHP or ASP to perform includes:
ASP: <!--#include virtual="page.html” -->
PHP: <?php include("page.html") ?>
You will see it’s very similar code.
Conclusion
As I said earlier, I am putting this article together because I find there’s a lot of “this is what you do” commentary out there but not enough “this is how you do it.” So I decided I’d provide a few of these how to articles.
I know there’s probably information I’ve left out here. What I’ve given here are the basics. There is also other content that can be included.
For example, on my site I also have recent forum posts and recent blog posts included on the home page. This take a little bit more work, but is still easily achievable.
Remember, if you run a completely static site, includes can help you manage the tedious task of site wide updates. In fact includes can be handy for any site as they can help improve sitewide management and maintenance.
Resources:
Apache SSI (Server Side Includes) tutorial
IIS: Notes on Server-Side Includes (SSI) syntax
Rob Sullivan is a SEO Consultant and Writer for Textlinkbrokers.com
ARCHIVES

![XML RSS FEED [XML RSS FEED]](http://www.textlinkbrokers.com/blogs/images/xml.gif)


