If your files are in the same directory:
<a href="contact-us.shtml">Contact Us</a>
No database, no backend language runtime — just Apache or Nginx with SSI enabled. Perfect for:
On some legacy servers, .shtml is not required. You can use .stm or .shtm. If you cannot get .shtml to parse, test .stm instead. view shtml link
File: index.shtml
<!DOCTYPE html>
<html>
<head><title>My Site</title></head>
<body>
<!--#include virtual="header.html" -->
<h1>Welcome</h1>
<p>Main content here.</p>
<!--#include virtual="footer.html" -->
</body>
</html>
When a visitor requests index.shtml, the server replaces the include lines with the actual content of header.html and footer.html. The user never sees the SSI directives—only the final merged HTML. If your files are in the same directory:
| Problem | Why it happens | Fix |
|--------|----------------|------|
| Page shows [an error occurred...] | SSI directive syntax wrong or file path invalid | Check the .shtml file on the server |
| Download instead of display | Server MIME type misconfigured | Ensure text/html for .shtml |
| Includes missing after moving site | Virtual paths are relative to server root | Use absolute or correct relative paths |
If you right-click and select “View Page Source,” you will not see the SSI directives. You’ll only see the final HTML output. The original <!--#include ... --> lines are gone — executed and replaced by the server. When a visitor requests index
To see the raw .shtml source with SSI commands, you would need: