Created on
04-29-2025
04:42 AM
Edited on
06-16-2025
09:48 PM
By
Anthony_E
Description | This article explains how to redirect users from a blocked website to a specific URL using the replacement message functionality in FortiGate. This is applicable when there is a requirement to guide users to an alternative site when accessing blocked URLs. |
Scope |
Generally, to redirect from one URL to another URL, it has to be done from DNS server end. However from the FortiGate any blocked page can be redirected to an specific URL by using replacement messages. However, every URL that is blocked will be redirected to that URL as the setting for replacement message is global.
Note: This applies globally to all blocked URLs. It is not possible to configure per-domain redirects from the FortiGate replacement message.
Steps:
<script> window.location.href = "https://www.google.com"; <----- Mention any URL to redirect the blocked URL. </script>
This JavaScript will automatically redirect the browser to https://www.google.com when any blocked site is accessed.
Once a user attempts to access example.com, FortiGate will block the access based on the static URL filter. In this example, instead of showing the default block message, the browser will automatically redirect the user to https://www.google.com
Related documents: |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.