Skip to main content
If you run a Fastly VCL (Delivery) service and don’t want to stand up a Compute service, you can still see who is crawling your site. A VCL snippet builds one JSON line per request and a log-streaming endpoint ships it to Supertab, where it is classified the same way as events from the SDK. The snippet runs in vcl_deliver, after the response has already gone to the visitor. It makes no network calls, adds no origin fetches, and does not affect caching.
This gives you analytics only — no CAP enforcement. Requests are observed and labelled, never blocked or challenged. Acting on a license needs the SDK in a Compute service; see Connect on Fastly. A VCL service can also serve your RSL license without the SDK — see Serving the license on VCL.

What gets recorded

Per request: timestamp, a Fastly request id, client IP, user agent, path, method, Accept-Language, host, response status, country, network (ASN and operator), the Sec-Fetch-* headers, HTTP Message Signature headers when present, which standard headers were sent, whether a cookie was sent, and three measurements of the query string. Deliberately not recorded — meaning never written to the log line Supertab receives. Your traffic is served exactly as before, so anything below still reaches your own origin as part of the normal request:

Before you begin

Authentication uses Fastly’s IAM-role access method: your Fastly account writes directly into a bucket provisioned for you, and Fastly proves which account it is writing for. There are no credentials — nothing is sent to you that could leak, nothing to store in Fastly, nothing to rotate. That works because the bucket is bound to your Fastly account, so setup starts with one value from you:
  1. Send Supertab your Fastly customer ID — in the Fastly web interface under AccountAccount info. If your organization has more than one Fastly account, it must be the account this service is listed under — an ID from a different account fails silently later (see troubleshooting).
  2. Supertab provisions your bucket and sends back the two values below.
You then need permission to edit and activate the service, and three values:

Set it up

1

Clone the active version

Open the service, click Edit configuration, and clone the active version. Everything below happens on that draft and goes live only when you activate it.
2

Create the VCL snippet

Go to VCL SnippetsCreate snippet:
The subroutine must be deliver. The snippet reads the response status, which does not exist in recv — the default — so choosing recv fails to compile.
3

Paste the snippet

Paste the code below into the snippet’s VCL field.
Replace YOUR_WEBSITE_URN with your Website URN. It appears once, marked by a ==== banner near the top of the snippet. Keep the %22 quotes around it.Paste the whole value including the urn: prefix — the placeholder is the entire URN, not just the id:urn:stc:merchant:system:3f9a1c72-8b04-4e15-9c7d-2a6f0e4b1d83Getting this wrong raises no error. The snippet compiles, log files are written, and your dashboard stays empty.
4

Create the logging endpoint

Go to ResourcesLog streamingCreate endpointAmazon S3:Under Advanced options, set Log line format to Blank and leave compression off.Four of these are easy to get wrong, and none of them raise an error:
  • Log format replaces the prefilled JSON template entirely — delete it. The snippet already builds the JSON; this field only emits it.
  • Log line format must be Blank. The Classic default prepends a syslog header and corrupts every line.
  • Compression must be off. Supertab reads the *.log objects as plain newline-delimited JSON.
  • Path must be exactly bot-events/, trailing slash included — not a subfolder, not your company name.
Everything not listed here — Timestamp format included — stays at its default.
Period 60 is the recommended steady-state value: one file per minute per cache node, and your dashboard stays about a minute behind real time. A longer period only delays your own data.
5

Attach a condition to the endpoint

Still on the bot_events endpoint, choose Attach a conditionCreate a new response condition:This makes the endpoint log only when the snippet actually built an event. Without it, legs where the snippet correctly skips — most commonly the shield leg on a shielded service — log a literal (null) line, and one such line makes the entire file unparseable on our side: every valid event in it is silently lost, with no error anywhere.
6

Activate

Activate the version. The snippet, the condition, and the logging endpoint go live together.

Confirm it’s working

Send some traffic, then allow 15 minutes before checking. Logging configuration takes a few minutes to reach every POP, Fastly writes one file per Period, and it buffers per cache node — so events arrive as a trickle rather than all at once. Requests served before the log endpoint reaches a POP are lost rather than delayed. Then open your dashboard. Crawlers that hit your site in that window appear there, classified by operator. If it’s still empty, work through the table below.

Troubleshooting

Misconfigurations here fail quietly rather than erroring, so work down the list in order.
Every request is logged, including cache hits. With shielding enabled the line is built only at the edge POP — that’s what the snippet’s visits_this_service guard is for — so requests are not counted twice, and the response condition keeps those shield legs from logging at all.

Connect on Fastly

Serve your RSL license and enforce CAP on Fastly, with Compute or by chaining VCL to a validator.

Deploy at the Edge

CDN-agnostic guide covering RSL serving, CAP enforcement, and robots.txt.