Follow

Optimizing Honeypot Links for Pages with Inline JavaScript

We generally inject honeypot links at the first instance of an anchor tag, e.g., the link between the first appearance of <a> and </a>. This typically doesn’t cause any issue, since anchor tags are usually written in HTML. For example, the screenshot below shows Distil’s honeypot link inserted immediately after the first </a>:

NOTE: Do not click honeypot links. Doing so adds you to our Known Violators list for seven days.

However, in some cases a website uses JavaScript (JS) to write some HTML, and the first anchor tag instance (between <a> and </a>) is within the JS code. In such cases the honeypot link injection might disrupt or break JS execution on the page.

The options to avoid this issue vary depending on whether or not you migrated your domains to the Apollo version of Distil.

Apollo Platform

If you have migrated your domains to the Apollo version of Distil, you can tell us the specific HTML tag of where to insert the honeypot link in your page’s source code. Simply contact Distil support and provide the HTML tag where you would like us to inject the honeypot link (e.g. </head>).

Alternatively, you can contact Distil support to disable the injection of honeypot links within your domain.

NOTE: Honeypot links are used to catch “unsophisticated” bots. They’re nice to have, but aren’t essential to Distil’s functionality.

Classic Platform

If you have not migrated your domains to the Apollo version of Distil, you can make one of the following minor alterations to your page’s code:

NOTE: Honeypot links are used to catch “unsophisticated” bots. They’re nice to have, but aren’t essential to Distil’s functionality.

  • Move your JS lower in the page, or place a pure HTML anchor tag somewhere above it. This way, Distil injects the honeypot link into the HTML anchor tag instead within your JS.
  • Move your JS to an external file and reference it in your HTML page. Distil doesn’t inject anything into JS files.
  • Add the following comment near the top of your page (and above the JS) to force our injection to happen there: <!-- <a></a> -–>  
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments