AlfieWebDevTips Homefor new and experienced developers
[Home Home] [Web Development Web Development ] [Code Generators Code Generators ] [Resources Resources ] [Contact Us Contact ] |WebDevTips Privacy Privacy |
Print This Page

You are here : Home - Web Development - Search engine tips using SSI

Search engine tips using SSI

One problem you might encounter when you build a site using server side includes, is that search engines might not index your site. Although dynamic sites are getting more common - some search engines will not index pages that are dynamically created. All is not lost as there are some techniques that some search engines use that means we can try to fool them.

One of these techniques is that the robot knows which file extensions are usually related to dynamically built pages. For example

  • .shtml - server side includes
  • .php .phtml .php2 - php, which is a hypertext pre-processor
  • .cgi .pl - common gateway scripts
  • .asp - active server pages
When some robots find one of the above examples it won't index it. What it will index are pages that it knows are static html pages
  • .shtml
  • .htm

You can work around this is by setting your server up to parse .htm extensions as SSI. This solution won't be possible for everyone. If your web space is SSI enabled and your hosting provider won't let you parse .htm as SSI use this argument.

When they tell you it will impact server performance as every .htm has to be parsed by the server before being sent to the end user and that it is not an efficient use of server resources.
Tell them this.
It shouldn't make the slightest bit of difference - as my whole site will be dynamic every page will have an .shtml extension which has to be parsed by the server. All I want is a .htm extension - the same amount of pages will still be parsed by the server so what's the problem? I think you get the idea ;)

This solution is not foolproof as some robots check for the document filesize. The filesize will almost certainly be returned to the robot from a static page. A dynamically built page will normally be unable to determine the filesize and the robot will then assume that it is a dynamic page and not index it. What you are able to to by changing the extension from one that is usually associated to dynamically built pages to one that is associated with static pages is the robot will at least look at the page and not ignore it because of its file extension.

Server side includes generally tend to use 1 header file throughout the whole site. As such, maintenance of the metatags is easier than it would be on a static site but you have to choose your metatags carefully and be as descriptive as possible.

Metatags on a SSI site have to be specific to the site as a whole and not relevant to any one section. The title of the header document has more importance on an SSI site as it will be used on every page. Again, choose your title carefully and be as descriptive as possible.

Remember that not all search engines index a site using metatags. The content you provide can be more beneficial to a lot of search engines and more importantly to your human visitors.

The Meta Tag | Frames | SSI


[back to top of page]   

[labelled with icra -  - this link will open in a new window] [RSS Content]

[Copyright © WebDevTips]