When writing your include syntax, prioritize virtual over file.
Virtual paths are safer when you move files between directories.
If you right-click a .shtml link and “view source,” you’ll see the output HTML—not the original SSI directives. That’s because the server-side processing already happened. The browser never gets to see the #include lines.
To inspect the raw .shtml source, you’d need:
If you rename a file to .shtml, the server must be configured to parse that extension for SSI directives. If the server isn't configured correctly, the browser will either download the file, show an error, or display the raw code (<!--#include...-->).
Viewing an .shtml link doesn’t require magic — just a normal browser. But understanding what happens behind the curtain reveals one of the earliest and most elegant forms of dynamic content generation.
Next time you see .shtml in a URL, appreciate the small, invisible assembly happening on the server. And if you need to reuse headers across 100 static pages without a CMS, you now know exactly which tool to reach for. view shtml link
Further reading:
Have you ever debugged a broken SSI include? Share your story in the comments.
file (Server-Side HTML) is a web page that uses Server Side Includes (SSI)
to dynamically pull in content—like headers or footers—from other files before the page loads University of Oxford Whether you are trying to one of these files safely or
a guide for your own site using them, here is how to handle .shtml links effectively. How to View an .shtml Link
To a regular visitor, an .shtml link works just like a standard .html link. However, if you are concerned about security or want to inspect the link before clicking: Desktop Preview When writing your include syntax, prioritize virtual over
: Hover your mouse over the link. On most browsers, the full destination URL will appear in the bottom-left corner of the window Mobile Preview
: Press and hold the link until a "bubble" or preview dialog box appears showing the actual URL Boston University Safe Inspection
: If you want to see the page's text without running scripts, tools like can convert the content into plain text for easier reading Fast Company How to Write a Guide Using .shtml Links
If you are building a website and want to use .shtml links to create a "Guides" or "Help" section, follow these best practices for accessibility and clarity: Use Descriptive Link Text
: Avoid generic phrases like "click here." Instead, use text that describes the destination, such as Training & Guides Harvard University Clarify Document Types
: If an .shtml page links to a non-web file (like a PDF), state that in the link text—for example, "Download the User Manual (PDF)" Harvard University Maintain Content Consistency SSI directives Virtual paths are safer when you move files
to pull in a universal navigation bar or footer. This ensures that every page in your guide has the same look and feel without you needing to update every file manually University of Oxford Ensure Mobile Friendliness
: Ensure your link text is long enough to be easily tapped on a touchscreen. Single-word links are often difficult for users with reduced motor skills to select University of Dundee Best Practices for Guide Layout
Technique: Writing link text | Digital Accessibility Services
When a link leads to a document that's not a web page, such as a PDF or Word document, that should be clarified in the link text. Harvard University Writing useful and accessible link text for websites
| Symptom | Likely Cause | Solution |
| :--- | :--- | :--- |
| Raw code visible | Server not parsing .shtml | Enable SSI in .htaccess or IIS settings |
| 404 Not Found | The .shtml file doesn't exist | Check the file path; remember it is case-sensitive on Linux |
| 500 Internal Error | Syntax error in directive | Check for missing quotes or spaces: virtual= must be exact |
| Includes not working, rest loads | Incorrect file path inside the include | Ensure the target file exists where the virtual path says |
| Page loads forever | Nested infinite include loop | Check if header.shtml includes main.shtml |
| 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 |