Link safety

Link safetyPreview

Link safety checks where the links in an asset lead and acts on assets that link to phishing, malware, adult or gambling sites, through its own section of your moderation policy. Turn it on by choosing an action for a verdict in your Portal › Moderation policies.

What is checked

Links are found in:

  • Plain-text documents.
  • Images, through link detection, which is on by default: QR codes, and the extracted text when OCR is on. An upload that turns link detection off has no image links checked.
  • Videos: QR codes in the sampled frames. Web addresses shown as text in a video, and spoken in audio, aren't read as links.

Each link is then checked:

  1. Every link is followed one redirect at a time, up to 10 redirects and 10 seconds per link. CalmLens requests each address once, as CalmLensBot (see Crawler), without cookies, without running scripts and without loading the page's images or other files. It follows HTTP redirects and meta refresh tags. Some well-known pages stand for another address, and CalmLens reads that address from the link instead of requesting the page, then follows it as if the page redirected there:

    • Redirect pages that carry their destination in the link itself, such as the outbound-link pages of search engines and social networks.
    • Archives and proxies that show another site's content under their own address, such as Wayback Machine snapshots (web.archive.org/web/…/<address>), archive.today snapshots, Google's cache, Google Translate (translate.goog and translate.google.com) and 12ft.io.

    Both the page and the address it stands for are checked, so an archived or translated copy of a site gets that site's verdict. An archive.today snapshot linked by its short ID (such as archive.ph/AbCdE) doesn't say which site it shows, so it is unresolved, like a short link that can't be followed. Redirects made by scripts aren't followed.

  2. Each address on the way, and the destination, is checked: its domain against domain categories, and the URL against lists of phishing and malware pages. A link takes the most severe verdict of any of them, so a link through a phishing page counts as phishing even if the chain ends on a safe page.

A page that doesn't respond is checked at its own address. A short link (a known shortener, or a domain classified as a redirect service) only redirects, so one that doesn't lead anywhere is unresolved, as is a chain that loops, runs past the limits or leads to a private network address. CalmLens never requests private, loopback or local network addresses, or ports other than 80 and 443.

Requesting a link is a visit to it. Pages that act on a visit, such as single-use sign-in or unsubscribe links, see the request as one.

Up to 20 links per asset are checked, at the same time as the content is classified. The first check of a domain can add up to about 20 seconds to classification. Verdicts are cached for up to a day, and unlisted URLs and redirect targets for 30 minutes, so later links to the same places are quicker, and a destination's verdict can take that long to change.

Verdicts

Each link gets one verdict, the most severe its checks support:

VerdictMeaning
phishingThe destination is listed as phishing or social engineering.
malwareThe destination is listed as malware, unwanted software or a botnet host.
adultThe destination's domain is classified as adult content.
gamblingThe destination's domain is classified as gambling.
unresolvedA short link or redirect chain couldn't be followed to its destination, or a check couldn't answer. It is never treated as safe.
safeEvery check answered and none of the above applies.

Policy settings

The link-safety section of a policy sets an action for each verdict: allow, limit, age-restrict or block. A verdict without an action is allowed. The asset takes the strongest action any of its links takes, and that raises the policy's decision; a stricter category decision still applies.

Optionally, act on every off-platform link: any link whose destination is outside your allowed domains takes the action you choose, whatever its verdict. A domain also covers its subdomains.

Link safety is separate from the moderation categories. Where a link leads never changes a category's score, because categories describe the content itself. Each built-in policy sets its own link actions; change them in your own copy.

Results

Each checked link appears on the asset in classification.linkSafety.links:

FieldMeaning
urlThe link as found.
finalUrlWhere it leads after redirects, or null when it couldn't be followed.
redirectsHow many redirects were followed.
sourceWhere the link was found: qr-code or text.
verdictIts verdict.
evidenceOne entry per check, covering every address on the way: its labels are what the check reported for any of them.

classification.moderation.linkSafety records the action, the checked links that take it (in the same shape as classification.linkSafety.links) and the settings in force. When a link decides the asset, classification.moderation.source is link-safety.

When a check can't answer

A link whose check couldn't answer for any address on the way, for example because a check timed out, has that check's evidence entry with status: "failed", and its verdict is unresolved unless an address got a more severe verdict. A link that couldn't be followed has finalUrl: null, and its evidence covers the addresses reached before it stopped. classification.linkSafety.status stays evaluated in both cases, because every link still gets a verdict for your policy to act on. To hold back links that couldn't be checked, give unresolved a stricter action; this also catches short links that can't be followed.

An asset whose links act also records an asset.link-flagged event with the link's verdict, the link and its destination. The portal shows each link's verdict and destination on the asset page and in the review queue, as text rather than clickable links.

Test inputs set moderation category findings only; there are no CalmLens test inputs for link verdicts. These public test pages are on the phishing and malware lists CalmLens checks, and give real phishing and malware verdicts:

  • https://testsafebrowsing.appspot.com/s/phishing.html
  • https://testsafebrowsing.appspot.com/s/malware.html

They are harmless, but checking them makes real lookups and counts as a normal upload. To check redirect handling, wrap one in a redirect page, such as https://www.google.com/url?q=https://testsafebrowsing.appspot.com/s/phishing.html, or put it in a QR code in an image. The addresses contain the words "phishing" and "malware", so your policy's categories can act on the text as well; read classification.linkSafety and classification.moderation.source to see what link safety decided. There are no harmless test pages for the adult and gambling verdicts, and a short link that no longer exists gives unresolved.

Last updated

Signing in

Signing out

Cookies on CalmLens

We use essential cookies for sign-in and security. With your permission, functional cookies remember your preferences and Google Analytics measures website use and signups. Optional ad measurement cookies link Google ad clicks to signups. Personalised advertising stays off. Manage cookies