Skip to main content

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"). 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:

Create Custom Templates or template list in SafeSquid interface

I Am saving this file with name:

Custom_template.html

I will use this file in the below configuration

Access the SafeSquid user interface

Go to Configure Page

Clicking on configure in SafeSquid interface

Go to Custom Settings

Clicking to custom settings

Go to Templates

Clicking on templates

Clone existing entry

Cloning the existing entry by clicking on clone

Edit the original entry

Clicking on edit to edit the policies

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

Editing the comment as per your entry

In profiles, selecting the required profile in the drop down menu

Do not change the "name" field

Giving the name of your html file in file field

clicking on save policy to save it

Saved rule

Testing

Testing the template

Saving the Configuration

clicking on save config to save the policy

Verification and Evidence

  • Interface Checks: In 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, Customisation, Access Restriction, Troubleshooting