If you have configured your server to parse .html or .htm files as Server Side Includes (SSI/SHTML) and it is not working, this guide covers the correct setup and common fixes for Ultra Web Hosting accounts.
Add this line to your .htaccess file to parse .html and .htm files for Server Side Includes:
AddHandler server-parsed .html .htm
If that does not work, try the alternative directive:
AddType text/html .shtml
AddHandler server-parsed .shtml .html .htm
01. What is SSI/SHTML
Server Side Includes (SSI) is a simple server-side scripting language that lets you include common elements (headers, footers, navigation) across multiple HTML pages. Files with the .shtml extension are parsed for SSI directives by default. Regular .html files are not parsed unless you explicitly enable it.
Common SSI directives:
<!--#include virtual="/header.html" -->
<!--#echo var="DATE_LOCAL" -->
<!--#exec cmd="date" -->
02. How to Enable SSI for HTML Files
Create or edit the .htaccess file in your document root (public_html/) and add:
AddHandler server-parsed .html .htm
This tells Apache to scan .html and .htm files for SSI directives before serving them to the browser.
Enabling SSI parsing for all HTML files means Apache must process every HTML page through the SSI parser, even pages that do not use any SSI directives. On high-traffic sites, this adds unnecessary overhead. Consider using .shtml extensions only on pages that need SSI, or switch to PHP includes instead.
03. Troubleshooting
- SSI directives show as HTML comments - the handler is not active. Check that your .htaccess file is saved correctly and does not have a different extension. See htaccess file disappearing
- 500 Internal Server Error - the SSI directive has a syntax error. Check for typos in the
<!--#includesyntax. Every directive must start with<!--#and end with--> - Included file not found - the
virtualpath is relative to the document root, not the current directory. Use/path/from/docroot/file.html - exec directive not working -
exec cmdmay be disabled on shared hosting for security. Useinclude virtualwith a PHP or CGI script instead
For more .htaccess configuration, see Complete Guide to .htaccess on Apache.
04. Modern Alternatives
SSI was popular in the 1990s but has largely been replaced by better options:
- PHP includes - rename your files to
.phpand use<?php include('header.php'); ?>. More flexible and widely supported. See How to Parse HTML as PHP - WordPress or a CMS - handles headers, footers, and templates automatically
- Static site generators - tools like Hugo, Jekyll, or 11ty build complete HTML from templates
Need Help With Your Website?
If you are having trouble with SSI or need help modernizing your site, our team can assist.
Open a Support TicketQuick Recap: SSI/SHTML Setup
- Add
AddHandler server-parsed .html .htmto .htaccess - Use correct syntax for includes:
<!--#include virtual="/path" --> - Check paths are relative to document root, not current directory
- Consider PHP includes as a more flexible modern alternative
- Use .shtml extension only on pages that need SSI to avoid performance overhead
4,530 users found this article useful · Last updated March 2026 · Browse all General articles
