What’s an SHTML index?

Print anything with Printful



HTML is used to create web pages, with the introductory page often called “index.html”. By using Server Side Includes (SSI) and saving the page as index.shtml, changes to the navigation menu can be made site-wide by editing a single file. SSI can also be used for other dynamic content, but requires a web server that offers Server Side Includes.

HTML (Hypertext Markup Language) is used to create web pages on the internet. The introductory page of most websites is called “index.html” and is intended to provide navigational links for the site. When this page contains special instructions called Server Side Includes (SSI), the page must be saved as index.shtml, thus creating a SHTML index page. Including an SSI directive or server instructions on your index page can greatly simplify the task of maintaining accurate site navigation, not just from the SHTML index page itself, but from all pages within your site .

Proper site navigation is a key feature of any website, but navigation links can be broken by deleting or adding pages or moving content around. This may mean tediously tweaking the navigation code on each of the remaining pages to account for the changes. Using a SHTLM index strategy, only a single navigation file needs to be changed for the changes to be dynamically reflected on all pages within the site, because the content of that single file can be embedded on the fly into every page of the site.

To use SSI, simply include an SSI directive or line of SSI code in your HTML page and save it in SHTML. This SSI directive instructs the server to paste additional content into the body of the web page before serving it. The additional content in this case would be a separate HTML file residing on the server that contains the site’s menu code. The menu code is placed where the SSI directive is located on the web page. By placing an SSI directive on every page of your site, you can update site-wide navigation by changing only the individual menu file.

The SSI directive looks like this: where the menu.html file can be called anything. After embedding the one-line directive in the HTML page, the page must be saved with the .shtml extension. No other action is required other than creating the menu page itself and uploading it to the server. The menu file is saved with the .html extension and requires no header tag. As a simple example, the contents of the menu.html file might look like this:

By pasting the SSI menu directive into every page of your website, all pages will display this content. If a web page is deleted or moved, simply edit the menu.html file and all pages will display updated navigation links.
Since SHTML directives can also be used to serve other dynamic content besides menu navigation, a SHTML index page doesn’t need to include a SHTML index, but navigation menus are highly encouraged and help search engines crawl of the site. Broken navigation links only harm site traffic and search engine rankings.
Additional uses for SSI include adding headers or footers to a site, time and date stamping, displaying last modified information, or outputting the results of a CGI script as a page counter. To take advantage of the SHTML index and web pages, the web server hosting the domain must offer Server Side Includes with the hosting plan. Otherwise, the host will serve the SHTML pages without parsing them, which means the server will not execute the SSI instructions.
Many examples of different SSI directives are available via search. Web browsers can display the SHTML index and web pages just as easily as HTML index pages, without the need for any additional plug-ins or features.




Protect your devices with Threat Protection by NordVPN


Skip to content