Follow

Creating Custom Browser Validation and Identity Pages

The Distil platform will at times serve pages back to the browser which are meant to identify and validate the browser. These page may be displayed when in monitor only mode. These pages are never shown to whitelisted requests including those from good bots.

The Distil platform offers the ability to customize these identification pages with your own branding in order to maintain a consistent user experience on a domain by domain basis.

The following browser validation pages can be customized for all accounts:

  • JavaScript ValidationPresented when identification is required, and the page triggering the requirement is a POST.
  • Unable to Identify – Presented when identification is required to proceed, but the browser is not able to complete it.

Creating a Custom 'JavaScript Validation' Page

A Custom JavaScript Validation page can be shown when a POST request is received from a client that has either failed JavaScript tests or, in the case of Force Identification, is not recorded as currently having cleared JavaScript. It is basically the identify page for POST requests.

To include the Distil Networks Custom JavaScript Validation page, you must include this HTML comment in the <body> of the page:

​<!-- DISTIL VALIDATE FORM -->
<!-- DISTIL REQUEST ID -->
​<!-- DISTIL SERVER ID -->
<!-- DISTIL STATUS -->

Additionally, the source code below allows you to generate traces that are similar to the trace information shown our Block and Captcha pages. Since the Validation and Identify pages do not display the complete trace as the nature of this page is different, you can use the code to remain consistent across all your custom pages.

​<p id="trace" style="font-size: 8pt">
<script>
var utcDate = new Date(new Date().getTime());
document.getElementById("trace").innerHTML = "You reached this page when attempting to access " + window.location + " at " + utcDate + "<br /> Trace: <!-- DISTIL REQUEST ID --> via <!-- DISTIL SERVER ID --> <!-- DISTIL STATUS -->";
</script>

NOTE: It is highly recommended to run little to no JavaScript on this page.

To set up a Custom JavaScript Validation page:

  1. Log in to the Distil Portal.
  2. Search for and select the parent Domain or Account you are configuring.
  3. Select Sign Into Account to access the Domains Dashboard.
  4. Select the specific domain you are configuring.

  5. Click Settings in the top banner menu.

  6. Click Custom Pages, within the Protect your content section.

  7. Enter the page's relative link in the URL for custom JavaScript validation field.
  8. Click Save.
  9. Test your custom JavaScript validation page before moving your page to production.
  10. When you are ready to push your page to production, select Enabled? and click Save.

Creating a Custom 'Unable to Identify' Page

A custom Unable to Identify page can be shown to verify a Distil unique identifier where the identifier has not been validated. 

Additionally, the source code below allows you to generate traces that are similar to the trace information shown our Block and Captcha pages. Since the Validation and Identify pages do not display the complete trace as the nature of this page is different, you can use the code to remain consistent across all your custom pages.

​<p id="trace" style="font-size: 8pt">
<script>
var utcDate = new Date(new Date().getTime());
document.getElementById("trace").innerHTML = "You reached this page when attempting to access " + window.location + " at " + utcDate + "<br /> Trace: <!-- DISTIL REQUEST ID --> via <!-- DISTIL SERVER ID --> <!-- DISTIL STATUS -->";
</script>

To set up a Custom Unable to Identify page:

  1. Log in to the Distil Portal.
  2. Search for and select the parent Domain or Account you are configuring.
  3. Select Sign Into Account to access the Domains Dashboard.
  4. Select the specific domain you are configuring.

  5. Click Settings in the top banner menu.

  6. Click Custom Pages, within the Protect your content section.

  7. Enter the page's relative link in the URL for custom unable to identify field.
  8. Click Save.
  9. Test your custom unable to identify page before moving your page to production.
  10. When you are ready to push your page to production, select Enabled? and click Save.

Caching of Custom Browser Validation Pages

It's also important to note that these pages fall under the same caching rules as your normal website. If you have pages set to cache, the custom page will be served from cache until it expires.

If the page is not cached or prevents caching, Distil will retrieve it from origin on every request that triggers a validation. For this reason, we recommend using Cache-Control headers to prevent caching only during testing. Once you've gotten the page looking exactly how you'd like--update the pages' Cache-Control headers to allow Distil to cache your new custom pages.

Should these pages become cached and you need to clear them from the Distil cache, you can clear their cache entries using the Distil Portal.

Testing Custom Browser Validation Pages

Before going live with your custom pages, it's important that you test them to make sure they have a look and feel in line with your website. Whether you've Enabled your custom pages live or not, you can test them at the following example URLs:

Javascript Validation Page

http://www.{yourdomain.com}/distil/dev/js_validate.html

Unable to Identify page

http://www.{yourdomain.com}/distil/dev/unable_to_identify.html

As with any change within the Distil system, it can take up to five minutes for these testing URLs to begin showing your updated Custom Browser Validation pages.

 

Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request

Comments