What does a Server Side Include do?
Server side includes allow you to (dare I use the word) include a remote file in the current page. The server constructs the page on the fly. When a browser or search engine spider comes through they see the whole page as one unit.
Why Should I use Server Side Includes?
They make it extremely quick to update navigation and other common page elements by only changing one file.
Are Server Side Includes Evil?
Server side includes were a bad thing in the past. Slower server speeds would sometimes cause errors when a spider spidered the page. With faster server speeds the server side include is no longer a problem. On sites with a large amount of traffic SSI will slow down your server speed ever so slightly.
What do Server Side Include Requests look like?
<!--#include file="navigation.htm" -->
if the SSI file is in the same directry as the file calling it, or
if the SSI file which is to be included is in the root directory. Using virtual causes the server to look for the file location based on the root URL.
How do I use a Server Side Include?
To use server side includes you must change your file path to .shtml .shtm or something with the .s at the begining to tell the server it needs to construct the page. Place the include file in the code where you want it to show on the page.
Note: you can controll the layout using an external CSS sheet if you like.
Why Changing Filepaths is Bad
The problem with changing filepaths is that you can lose much of the inbound link popularity you have built up with your site. Any links to the root domain will still be there, but interior links fall away. Blindly changing filepaths is extremely bad:
- You lose link equiyy.
- People who were linking to you end up owning a bunch of broken links.
How do I Use SSI without Changing FilePaths?
Our good friend .htaccess is here again to save the day.
Here is the .htaccess file you should use to allow a server to parse .shtml and parse other file extensions as .shtml
AddType text/html .shtml
AddHandler server-parsed .htm (.htm is whatever extension you are using)
AddHandler server-parsed .shtml
Options Indexes FollowSymLinks Includes
New to the site? Join for Free and get over $300 of free SEO software.
Once you set up your free account you can comment on our blog, and you are eligible to receive our search engine success SEO newsletter.
Already have an account? Login to share your opinions.
Gain a Competitive Advantage Today
Your top competitors have been investing into their marketing strategy for years.
Now you can know exactly where they rank, pick off their best keywords, and track new opportunities as they emerge.
Explore the ranking profile of your competitors in Google and Bing today using SEMrush.
Enter a competing URL below to quickly gain access to their organic & paid search performance history - for free.
See where they rank & beat them!
- Comprehensive competitive data: research performance across organic search, AdWords, Bing ads, video, display ads, and more.
- Compare Across Channels: use someone's AdWords strategy to drive your SEO growth, or use their SEO strategy to invest in paid search.
- Global footprint: Tracks Google results for 120+ million keywords in many languages across 28 markets
- Historical data: since 2009, before Panda and Penguin existed, so you can look for historical penalties and other potential ranking issues.
- Risk-free: Free trial & low price.