> ## Documentation Index
> Fetch the complete documentation index at: https://docs.safesquid.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom Templates

> Create custom templates in SafeSquid for error pages, branding, and blocked-content replacement using HTML, images, or executables.

# Replace blocked or error pages with custom content

SafeSquid uses templates to replace pages that cannot be displayed (filtering, error, or other conditions). Custom templates support non-English messages, company logos, and contact text (e.g. "If this site was blocked in error, contact [helpdesk@mycompany.com](mailto:helpdesk@mycompany.com)"). Templates can be HTML, images, audio, or executables. Built-in examples include tinygif, checkeredgif, and tinyswf; checkeredgif is the default replacement for images blocked by the pornographic image filter.

## Prerequisites

Create your own html file and place that file in the below paths

for windows version of SafeSquid:

**c:ProgramDatausrlocalsafesquidui\_roottemplates**

The path for Linux version of SafeSquid is:

**/usr/local/safesquid/ui\_root/templates/**

**Note**: If you want to use any images in the html file make sure that the image also exist in the same path.

## Example:

Here i am creating below html page:

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/D_QM4_e4oHdWyIb0/images/How_To/Create_Custom_Templates/image1.webp?fit=max&auto=format&n=D_QM4_e4oHdWyIb0&q=85&s=350b27028b179508a35ba2cf4e08fa56" alt="Create Custom Templates or template list in SafeSquid interface" width="646" height="289" data-path="images/How_To/Create_Custom_Templates/image1.webp" />

I Am saving this file with name:

**Custom\_template.html**

I will use this file in the below configuration

## [Access the SafeSquid user interface](/Configuration_Portal)

### Go to Configure Page

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/D_QM4_e4oHdWyIb0/images/How_To/Create_Custom_Templates/image2.webp?fit=max&auto=format&n=D_QM4_e4oHdWyIb0&q=85&s=318add2af2c9174b425bc1103b899292" alt="Clicking on configure in SafeSquid interface" width="1280" height="720" data-path="images/How_To/Create_Custom_Templates/image2.webp" />

### Go to Custom Settings

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/D_QM4_e4oHdWyIb0/images/How_To/Create_Custom_Templates/image3.webp?fit=max&auto=format&n=D_QM4_e4oHdWyIb0&q=85&s=459bc9c365d42d16a28defd26168eb7b" alt="Clicking to custom settings" width="1280" height="720" data-path="images/How_To/Create_Custom_Templates/image3.webp" />

### Go to Templates

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/D_QM4_e4oHdWyIb0/images/How_To/Create_Custom_Templates/image4.webp?fit=max&auto=format&n=D_QM4_e4oHdWyIb0&q=85&s=05170802fb777b8193dd02c0cf422023" alt="Clicking on templates " width="1280" height="720" data-path="images/How_To/Create_Custom_Templates/image4.webp" />

### Clone existing entry

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/D_QM4_e4oHdWyIb0/images/How_To/Create_Custom_Templates/image5.webp?fit=max&auto=format&n=D_QM4_e4oHdWyIb0&q=85&s=d49d615d51efe9c57a7b1adb300c7408" alt="Cloning the existing entry by clicking on clone" width="1280" height="720" data-path="images/How_To/Create_Custom_Templates/image5.webp" />

### Edit the original entry

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/D_QM4_e4oHdWyIb0/images/How_To/Create_Custom_Templates/image6.webp?fit=max&auto=format&n=D_QM4_e4oHdWyIb0&q=85&s=d9ebd6d397e3ee6d930cc7b80afb6731" alt="Clicking on edit to edit the policies" width="1280" height="720" data-path="images/How_To/Create_Custom_Templates/image6.webp" />

You must edit the original entry, because the entries in template section are processed from top to bottom

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/D_QM4_e4oHdWyIb0/images/How_To/Create_Custom_Templates/image7.webp?fit=max&auto=format&n=D_QM4_e4oHdWyIb0&q=85&s=c1efa1bc976853026cee875b28d41721" alt="Editing the comment as per your entry" width="1280" height="720" data-path="images/How_To/Create_Custom_Templates/image7.webp" />

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/D_QM4_e4oHdWyIb0/images/How_To/Create_Custom_Templates/image8.webp?fit=max&auto=format&n=D_QM4_e4oHdWyIb0&q=85&s=0f13af440c31cf2bcac6664d22cc17c6" alt="In profiles, selecting the required profile in the drop down menu" width="1280" height="720" data-path="images/How_To/Create_Custom_Templates/image8.webp" />

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/D_QM4_e4oHdWyIb0/images/How_To/Create_Custom_Templates/image9.webp?fit=max&auto=format&n=D_QM4_e4oHdWyIb0&q=85&s=72b3e6a66eae064dcfa049de285df3b3" alt="Do not change the &#x22;name&#x22; field" width="1280" height="720" data-path="images/How_To/Create_Custom_Templates/image9.webp" />

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/D_QM4_e4oHdWyIb0/images/How_To/Create_Custom_Templates/image10.webp?fit=max&auto=format&n=D_QM4_e4oHdWyIb0&q=85&s=c9b7623b46aa5b37d6d687a67008fc34" alt="Giving the name of your html file in file field" width="1280" height="720" data-path="images/How_To/Create_Custom_Templates/image10.webp" />

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/D_QM4_e4oHdWyIb0/images/How_To/Create_Custom_Templates/image11.webp?fit=max&auto=format&n=D_QM4_e4oHdWyIb0&q=85&s=3ea4b72100be3e08d91f6d034453c112" alt="clicking on save policy to save it" width="1280" height="720" data-path="images/How_To/Create_Custom_Templates/image11.webp" />

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/D_QM4_e4oHdWyIb0/images/How_To/Create_Custom_Templates/image12.webp?fit=max&auto=format&n=D_QM4_e4oHdWyIb0&q=85&s=4da474f863ecbd4f8f053c6685260859" alt="Saved rule" width="1280" height="720" data-path="images/How_To/Create_Custom_Templates/image12.webp" />

## Testing

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/D_QM4_e4oHdWyIb0/images/How_To/Create_Custom_Templates/image13.webp?fit=max&auto=format&n=D_QM4_e4oHdWyIb0&q=85&s=8189bb6585931fbed2c0ed308a0f2189" alt="Testing the template" width="1280" height="720" data-path="images/How_To/Create_Custom_Templates/image13.webp" />

## Saving the Configuration

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/D_QM4_e4oHdWyIb0/images/How_To/Create_Custom_Templates/image14.webp?fit=max&auto=format&n=D_QM4_e4oHdWyIb0&q=85&s=7e410398c77f30a48900ad8041b43cb5" alt="clicking on save config to save the policy" width="1280" height="720" data-path="images/How_To/Create_Custom_Templates/image14.webp" />

## Verification and Evidence

* **Interface Checks**: In [Configuration Portal](/Configuration_Portal), Custom Settings → Custom Templates: new template appears in the list with correct content and is assigned to the intended policy or block page.
* **Log Analysis**: When a block or redirect occurs, the custom template is served; config logs show the template change if applicable.
* **Performance Validation**: Trigger a block or use case that invokes the template; the custom message or page displays as designed.

**Related**: [Startup Parameters](/Startup_Parameters), [Customisation](/Customisation), [Access Restriction](/Access_Restriction), [Troubleshooting](/Troubleshooting)


## Related topics

- [Compliance Templates](/use_cases/access_restriction/compliance_templates.md)
- [Customisation](/use_cases/customisation/customisation.md)
- [Block Advertisements And Banners](/use_cases/content_modifier/block_advertisements_and_banners.md)
- [Templates](/admin_guide/policies_and_profiles/templates.md)
- [Data Leakage Prevention](/use_cases/data_leakage_prevention/data_leakage_prevention.md)
