Skip to main content
kmak
Staff
Staff
April 23, 2025

Technical Tip: How to configure default HTTP content routing server to route non-matching HTTP content routing host or URL to a default landing page server

  • April 23, 2025
  • 0 replies
  • 1653 views
Description This article describes the steps to configure the default HTTP content routing server to route non-matching HTTP content routing host or URL to a default landing page server.
Scope FortiWeb.
Solution

Prerequisite:

  • The server policy uses an HTTP Content Routing policy.
  • The default HTTP Content Routing server pool accepts all hostnames.

 

  1. Without configuring the default HTTP Content Routing rule for a Server Policy in FortiWeb, users will get a return code 503 when browsing to a FQDN/hostname that does not match any of the HTTP Content Routing rule policies.

 

kmak_0-1745392675319.jpeg

 

  1. It may be a concern for some users or customers to get the return code 503 or the error page.

 

kmak_1-1745392675321.jpeg

 

  1. The error page '503 Server Unavailable' can be customized with the 'Replacement Message' module in FortiWeb, but the return code will remain as '503 Server Unavailable' for users/visitors who browse to the hostname that does not match any of the HTTP Content Routing rules. Configuring the default HTTP Content Routing rule is the method to avoid the Server Policy returning the '503 Server Unavailable' return code when the hostname does not match any of the HTTP Content Routing rule policies.

 

kmak_2-1745392675322.jpeg

 

  1. To enable the default HTTP Content Routing rule, navigate to the Server Policy and check the HTTP Content Routing rule.

 

kmak_3-1745392675325.jpeg

 

  1. Select and edit the HTTP Content Routing rule that is going to be configured as the default HTTP Content Routing rule. Change the 'Default' option to 'Yes' to enable the HTTP Content Routing rule as the default rule.

 

kmak_4-1745392675328.jpeg

 

CLI command:

 

config server-policy policy
    edit "policy_name"
        config http-content-routing-list Default_page
            edit 1
                set content-routing-policy-name 
                set profile-inherit enable
                set is-default yes
            next
end

 

  1. The Server Policy should show the default HTTP Content Routing Rule in the table. Make sure that the default HTTP Content Routing server accepts any hostname request and displays the default landing page.

 

kmak_5-1745392675331.jpeg

 

  1. Test browsing to a hostname that does not match any of the HTTP Content Routing rule hostnames. The request should be sent to the default HTTP Content Routing server and display the default contents.

 

kmak_6-1745392675331.jpeg

 

Related document:

Defining your web servers