Question:
How to redirect users to a search engine when they have a DNS failure?
Contributed by Vladimir Sousa and Jeff Richmond, Cisco TAC Engineers.
Environment: WSA
Symptoms: When users type in a non-existent URL (not DNS resolvable) by default WSA will return a notification page similar to the following:
This Page Cannot Be Displayed
------------------------------------------------------------------------------------------------
The host name resolution (DNS lookup) for this host name ( temple.edu ) has failed. The Internet
address may be misspelled or obsolete, the host ( temple.edu ) may be temporarily unavailable,
or the DNS server may be unresponsive.
Please check the spelling of the Internet address entered. If it is correct, try this request later.
If you have questions, or if this condition persists, please contact your corporate network
administrator and provide the codes shown below.
------------------------------------------------------------------------------------------------
Notification codes: (1, DNS_FAIL, temple.edu)
Some customers would like to be able to redirect users to a search engine instead. This is similar to what is performed by Windows Live Search.
It is possible to redirect users request to non-existent URL by changing the default notification page to something similar to:
For Windows Live Search:
<html>
<head>
<title> Notification Page </title>
<meta name="author" content="Cisco systems">
<meta name="description" content="Notification Page">
<meta http-equiv="refresh" content="0;url=http://search.live.com/results.aspx?FORM=DNSAS&q=%H">
</head>
<body>
<p>
</body>
</html>
For Google:
<html>
<head>
<title> Notification Page </title>
<meta name="author" content="Cisco systems">
<meta name="description" content="Notification Page">
<meta http-equiv="refresh" content="0;url=http://www.google.com/search?hl=en&q=%H">
</head>
<body>
<p>
</body>
</html>
Steps for modifying the DNS_FAIL HTML file are below:
- FTP to the WSA - ftp admin@<WSA_host_name_or_IP>
- Browse to configuration/eun/en.
- Download and edit the ERR_DNS_FAIL page or create a new ERR_DNS_FAIL page.
- Upload the edited ERR_DNS_FAIL page to the configuration/eun/en folder.
- After uploading, login into the CLI interface. Then use the "Use Custom EUN pages" option; if this option is already enabled, use the "Refresh EUN pages" command to make the uploaded customized EUN pages effective. This option will be available under the CLI command --> advancedproxyconfig > EUN.