Sec-Fetch-Dest
The HTTP Sec-Fetch-Dest request header tells the server how a fetched resource will be used, such as a document, image, script, or iframe.
Usage
The Sec-Fetch-Dest header is part of the Fetch Metadata Request Headers specification. Browsers attach this header automatically to every request sent to a potentially trustworthy URL, which covers HTTPS endpoints and localhost. The value tells the server what type of resource the browser expects, enabling server-side policies to reject mismatched or unexpected resource requests.
A server handling an endpoint meant to serve images
verifies the Sec-Fetch-Dest value is image. When the
value does not match the expected destination, the server
returns a 403 response to block the request. This
pattern forms the basis of resource isolation policies
protecting against cross-site data leaks and speculative
execution attacks. A policy applies its checks only when
the header is present, because older browsers and
non-browser clients such as search crawlers send no
Fetch Metadata. The
Sec-Fetch-Site article holds a worked
isolation policy.
The header works alongside Sec-Fetch-Mode, Sec-Fetch-Site, and Sec-Fetch-User to give servers a complete picture of request context without relying on heuristics.
Directives
audio
The resource will be used as audio data, typically from
an <audio> element.
audioworklet
The resource is loaded as an audio worklet module.
document
The resource is loaded as an HTML or XML document, resulting from a top-level navigation such as clicking a link.
embed
The resource will be embedded through an <embed>
element.
empty
The empty value stands for requests with no specific
destination. Fetch's internal destination is the empty
string, and the browser writes the token empty on the
wire. fetch() and fetchLater() calls,
XMLHttpRequest, navigator.sendBeacon(),
EventSource, WebSocket and WebTransport
connections, <a ping> pings, and Cache API requests all
produce this value.
font
The resource is a font file, typically referenced from
a CSS @font-face rule.
frame
The resource loads into a <frame> element.
iframe
The resource loads into an <iframe> element.
image
The resource is an image, loaded through <img>, CSS
background-image, or similar mechanisms.
json
The resource is a JSON module imported using
import data from "./data.json" with { type: "json" }
or the import() function with an import attribute.
manifest
The resource is a web app manifest file.
object
The resource loads into an <object> element.
paintworklet
The resource is loaded as a CSS paint worklet module.
report
The resource is a reporting endpoint receiving violation reports from Content Security Policy or similar reporting mechanisms.
script
The resource is a JavaScript file loaded through
<script> or importScripts().
serviceworker
The resource is registered as a service worker.
sharedworker
The resource is loaded as a shared worker.
speculationrules
The resource is a speculation rules file fetched from a
URL named in the
Speculation-Rules response header
or in a <script type="speculationrules" src> element.
The value lets a CDN or firewall rule recognize the
rules fetch and serve it with the
application/speculationrules+json media type.
style
The resource is a stylesheet loaded through <link rel="stylesheet"> or a CSS @import rule.
text
The resource is a text module imported using
import "./notes.txt" with { type: "text" }, a
newer sibling of the json destination.
track
The resource is a WebVTT text track loaded through a
<track> element.
video
The resource is video data, typically from a <video>
element.
worker
The resource is loaded as a dedicated web worker.
fencedframe
The resource loads into a <fencedframe> element, an
embedding container isolated from the page around it.
Chromium-based browsers send this value.
webidentity
The resource is a FedCM (Federated Credential
Management) request made by the browser on behalf of
navigator.credentials.get(). The configuration,
accounts, and identity assertion fetches to the identity
provider all carry this value.
xslt
The resource is an XSLT stylesheet applied to transform an XML document.
Example
A browser loading a page sends document as the
fetch destination. The full set of fetch metadata headers
provides complete context.
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: none
Sec-Fetch-User: ?1
A cross-origin image request sends image as the
destination with no-cors mode because image elements
do not require CORS by default.
Sec-Fetch-Dest: image
Sec-Fetch-Site: cross-site
Sec-Fetch-Mode: no-cors
A fetch API call to a same-origin JSON endpoint sends
empty because the Fetch API has no predefined
destination type.
Sec-Fetch-Dest: empty
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Crawlers and Sec-Fetch-Dest
Googlebot and the other main search crawlers send no
Sec-Fetch-Dest, while crawlers built on a browser
engine send document on page requests. A policy that
requires the header blocks indexing. The
Sec-Fetch-Site article covers which
crawlers send Fetch Metadata and how a policy treats
requests without the headers.
Verified crawler probe
Probe data from verified crawler traffic (November 2026 snapshot) shows which bots send Sec-Fetch-Dest when requesting pages. Yes marks the header on at least nine of ten sampled requests from the bot, Sometimes marks a smaller share, and No marks absence.
| Crawler | Sends Sec-Fetch-Dest |
|---|---|
| Amazonbot | No |
| Applebot | No |
| Baiduspider | No |
| Bingbot | No |
| ClaudeBot | No |
| DuckDuckBot | No |
| GPTBot | No |
| Googlebot | No |
| Googlebot (smartphone) | No |
| Googlebot-Image | No |
| Meta-ExternalAgent | Sometimes |
| Meta-WebIndexer | Yes |
| OAI-SearchBot | No |
| PerplexityBot | Sometimes |
| SeznamBot | No |
| YandexBot | No |
| YandexFavicons | No |
See also
- Fetch Metadata Request Headers (W3C)
- Sec-Fetch-Mode
- Sec-Fetch-Site
- Sec-Fetch-User
- Sec-Fetch-Storage-Access
- Speculation-Rules
- HTTP headers