# Fastly Documentation
> Technical documentation for the Fastly Edge Cloud Platform - including CDN, Compute, security, and developer tooling.
https://www.fastly.com/documentation/
Fastly is a global edge cloud platform that enables developers to build fast, secure, and scalable applications. Our products and services include CDN delivery, serverless Compute, security solutions (WAF, DDoS, TLS), observability, and robust developer tooling.
---
## Core Areas
### Getting Started
- Full-Site Delivery (CDN): https://www.fastly.com/documentation/guides/full-site-delivery/getting-started-with-full-site-delivery/
- Compute: https://www.fastly.com/documentation/guides/compute/getting-started-with-compute/
- Next-Gen WAF: https://www.fastly.com/documentation/guides/next-gen-waf/getting-started/start-here/
- Core Concepts: https://www.fastly.com/documentation/guides/concepts/
### Guides
- Overview: https://www.fastly.com/documentation/guides/
**CDN & VCL**
- Caching configuration best practices: https://www.fastly.com/documentation/guides/full-site-delivery/caching/caching-best-practices/
- About VCL: https://www.fastly.com/documentation/guides/full-site-delivery/fastly-vcl/about-fastly-vcl/
- Custom VCL: https://www.fastly.com/documentation/guides/full-site-delivery/fastly-vcl/working-with-custom-vcl/
- Writing VCL Code: https://www.fastly.com/documentation/guides/full-site-delivery/fastly-vcl/writing-vcl-code/
- VCL Best Practices: https://www.fastly.com/documentation/guides/full-site-delivery/fastly-vcl/vcl-best-practices/
**Compute (Serverless)**
- JavaScript: https://www.fastly.com/documentation/guides/compute/javascript/
- Rust: https://www.fastly.com/documentation/guides/compute/rust/
- Go: https://www.fastly.com/documentation/guides/compute/developer-guides/go/
- How Compute compares to VCL: https://www.fastly.com/documentation/guides/compute/developer-guides/migrate/
**Security**
- Next-Gen WAF: https://www.fastly.com/documentation/guides/next-gen-waf/
- DDoS Protection: https://www.fastly.com/documentation/guides/security/ddos-protection/
- TLS & HTTPS: https://www.fastly.com/documentation/guides/security/tls/
**Observability**
- Overview: https://www.fastly.com/documentation/guides/observability/about-the-observability-pages/
- Alerts: https://www.fastly.com/documentation/guides/observability/alerts/about-alerts/
- Custom Dashboards: https://www.fastly.com/documentation/guides/observability/observability-dashboards/working-with-custom-dashboards/
- Logging: https://www.fastly.com/documentation/guides/integrations/streaming-logs/about-fastlys-realtime-log-streaming-features/
---
## Reference Docs
- Main Reference Index: https://www.fastly.com/documentation/reference/
**API**
- Fastly API: https://www.fastly.com/documentation/reference/api/
- API Tokens: https://www.fastly.com/documentation/guides/account-info/user-and-account-management/using-api-tokens/
- Next-Gen WAF API: https://www.fastly.com/documentation/signalsciences/api/
**VCL**
- Variables: https://www.fastly.com/documentation/reference/vcl/variables/
- Functions: https://www.fastly.com/documentation/reference/vcl/functions/
- Subroutines: https://www.fastly.com/documentation/reference/vcl/subroutines/
**Compute**
- SDKs & APIs: https://www.fastly.com/documentation/reference/compute/
**Other**
- HTTP Header reference: https://www.fastly.com/documentation/reference/http/http-headers/
- Image Optimizer: https://www.fastly.com/documentation/reference/io/
- Changelog: https://www.fastly.com/documentation/reference/changes/
---
## Code & Examples
- Code examples index: https://www.fastly.com/documentation/solutions/examples/
- VCL examples: https://www.fastly.com/documentation/solutions/examples/vcl/
- Compute JavaScript examples: https://www.fastly.com/documentation/solutions/examples/javascript/
- Compute Rust examples: https://www.fastly.com/documentation/solutions/examples/rust/
- Compute Go examples: https://www.fastly.com/documentation/solutions/examples/go/
- Demos and example apps: https://www.fastly.com/documentation/solutions/demos/
---
## Tutorials
- Deliver your site through Fastly: https://www.fastly.com/documentation/solutions/tutorials/deliver-your-site/
- CDN introduction: https://www.fastly.com/documentation/solutions/tutorials/introduction-to-cdn/
- Compute introduction: https://www.fastly.com/documentation/solutions/tutorials/introduction-to-compute/
---
## Platform Concepts
- **VCL Services**: Fastly's CDN offering for content delivery and routing logic at the edge.
- **Compute**: Serverless WebAssembly at the edge - with JS, Rust, and Go SDKs.
- **Edge Data Storage**: KV Store, Config Store, Secret Store.
- **Products**: CDN, Compute, WAF, DDoS, Image Optimizer, Load Balancer.
---
## Developer Tools
- Fastly CLI: https://www.fastly.com/documentation/reference/cli/
- Fastly Fiddle (browser-based VCL & Compute testing): https://fiddle.fastly.dev/
- Terraform Provider: https://registry.terraform.io/providers/fastly/fastly/latest/docs
---
## Help & Support
- Product descriptions: https://docs.fastly.com/products/
- Fastly Community: https://community.fastly.com/
- Service Status: https://www.fastlystatus.com/
---
## AI/LLM Access: Markdown Documentation
All Fastly documentation is available in machine-readable Markdown format optimized for AI assistants, LLMs, and automated tooling. This section explains how to discover and fetch documentation programmatically. Refer to this page to learn how to access documentation as Markdown: https://www.fastly.com/documentation/reference/markdown/
### Recommended Workflow
**Step 1: Search for relevant pages**
To find pages for a specific question or keyword, use the documentation search endpoint. This is the fastest way to locate relevant pages by relevance, ranked across page titles, headings, and descriptions:
```bash
curl -s "https://api.fastly.com/public-search/docs?query=image%20optimizer&limit=25"
```
- No authentication is required.
- `query` is the search term (URL-encode spaces as `%20`).
- `limit` caps the number of results (default: 100).
The response is JSON shaped as `{ "record_count": N, "records": [...] }`. Each record describes a matching page:
```json
{
"group": "Guides",
"content_type": "",
"term": "About Fastly Image Optimizer",
"url": "https://fastly.com/documentation/guides/full-site-delivery/image-optimization/about-fastly-image-optimizer/",
"description": "An overview of Fastly Image Optimizer.",
"headings": ["How it works", "Enabling Image Optimizer"],
"highlight": { "term": "About Fastly Image Optimizer" }
}
```
Key fields:
- `term` - the page title
- `url` - the page's HTML URL (see the conversion note below to fetch Markdown)
- `group` - the documentation section (Guides, Reference, Solutions, Products, etc.)
- `description` / `headings` - additional context, when available
- `highlight` - the matched text with `` tags around the matching terms
**Converting a search result URL to Markdown:** Search results return HTML page URLs, not Markdown. To fetch the Markdown for a result:
1. **Normalize the host.** Documentation results may be returned on the apex `fastly.com` host, which only redirects (301) to the canonical `www.fastly.com`. Rewrite `fastly.com` to `www.fastly.com` so you fetch the canonical URL directly and avoid the redirect. Leave `docs.fastly.com` URLs (product descriptions, changelogs) as-is.
2. **Strip any trailing slash and `#fragment`.**
3. **Append `.md`.**
| Search result URL | Markdown URL |
|---|---|
| `https://fastly.com/documentation/.../about-fastly-image-optimizer/` | `https://www.fastly.com/documentation/.../about-fastly-image-optimizer.md` |
| `https://docs.fastly.com/products/image-optimizer` | `https://docs.fastly.com/products/image-optimizer.md` |
Note that some results (for example, `docs.fastly.com` product descriptions) point to pages that are NOT in `markdown-index.json` (see below), so search surfaces pages the index alone does not.
**Step 2 (alternative): Browse the full index**
To enumerate all pages instead of searching - for example, to build an offline copy or filter by category - fetch the structured index:
```bash
curl -s "https://www.fastly.com/documentation/markdown-index.json"
```
This JSON index contains ~3,800 documentation pages with:
- Title, URL, summary for each page
- Category classification (guides, reference, solutions, developers)
- Subcategory tags (e.g., `api`, `vcl`, `cli`, `compute`)
- Full flat list in `allPages[]` for searching
Unlike search results, URLs in this index already include the `.md` extension - use them directly.
**Step 3: Fetch the Markdown content**
```bash
# URL from the index already has .md
curl -s "https://www.fastly.com/documentation/guides/account-info/billing.md"
# URL from search needs the host normalized to www.fastly.com and .md appended (trailing slash stripped)
curl -s "https://www.fastly.com/documentation/guides/full-site-delivery/image-optimization/about-fastly-image-optimizer.md"
```
### Additional Documentation Sites
For docs.fastly.com (product descriptions), markdown is available by appending `.md` to URLs:
- Product descriptions: https://docs.fastly.com/products/bot-management.md
- Monthly changelogs: https://docs.fastly.com/changes/2025/10/01/changes.md
- Significant changelogs: https://docs.fastly.com/changes/significant/2022/12/07/special.md
Note: These URLs are NOT in markdown-index.json (which only covers www.fastly.com/documentation)
### Example: Complete Workflow
Using search (recommended for finding pages by topic):
```bash
# 1. Search for pages about "image optimizer"
curl -s "https://api.fastly.com/public-search/docs?query=image%20optimizer&limit=25" | \
jq '.records[] | {term, url}'
# 2. Normalize the host to www.fastly.com, strip the trailing slash, and append .md
# "url": "https://fastly.com/documentation/guides/.../about-fastly-image-optimizer/"
# -> "https://www.fastly.com/documentation/guides/.../about-fastly-image-optimizer.md"
# 3. Fetch the Markdown
curl -s "https://www.fastly.com/documentation/guides/full-site-delivery/image-optimization/about-fastly-image-optimizer.md"
```
Using the index (for enumerating or filtering by title):
```bash
# 1. Find pages about "image optimizer"
curl -s "https://www.fastly.com/documentation/markdown-index.json" | \
jq '.allPages[] | select(.title | test("image"; "i")) | {title, url}'
# 2. Index URLs already include .md - use them directly
curl -s "https://www.fastly.com/documentation/guides/full-site-delivery/image-optimization/using-fastly-image-optimizer.md"
```
### Markdown Format Details
All exported Markdown files include:
- **YAML frontmatter** with metadata:
- `title` - Page title
- `summary` - Brief description
- `url` - Canonical URL (with `.md` extension)
- **Full document text** in clean Markdown:
- Properly formatted code blocks with language hints
- Absolute URLs for all links and images
- Tables, lists, and formatting preserved
- No HTML fragments or JavaScript
### What's Available
All documentation sections are available in Markdown:
- **Guides** (~500 pages): How-to guides, configuration, best practices
- **Reference** (~3,200 pages): API docs, VCL reference, CLI commands, HTTP headers
- **Solutions** (~140 pages): Code examples, tutorials, demos
- **Developers** (4 pages): Developer hub pages
Content is updated daily and synchronized with the live documentation site.
### Index JSON Structure
```json
{
"meta": {
"generated": "2025-03-17T12:00:00.000Z",
"totalPages": 3798,
"baseUrl": "https://www.fastly.com/documentation",
"description": "Structured index of Fastly documentation in markdown format"
},
"categories": {
"guides": {
"title": "Guides",
"description": "Step-by-step guides for using Fastly products and features",
"count": 487,
"pages": [
{
"title": "Billing address",
"url": "https://www.fastly.com/documentation/guides/account-info/billing.md",
"category": "guides",
"subcategory": "account-info",
"summary": "Manage your billing address and payment information"
}
]
},
"reference": {
"title": "Reference",
"description": "API documentation, VCL reference, and technical specifications",
"count": 3167,
"pages": [...]
},
"solutions": {
"title": "Solutions",
"description": "Tutorials, examples, and solution guides",
"count": 138,
"pages": [...]
},
"developers": {
"title": "Developers",
"description": "Developer resources and tools",
"count": 4,
"pages": [...]
}
},
"allPages": [
/* Flat array of all pages for searching */
]
}
```
### Use Cases
This markdown documentation is optimized for:
- **AI Assistants**: Fetching context for answering user questions about Fastly
- **LLMs**: Training data, RAG systems, semantic search
- **Documentation Tools**: Scrapers, indexers, offline readers
- **Automation**: CI/CD pipelines, testing, validation
- **Research**: Analysis, archival, backup
### Important Notes
1. **Search to find pages by topic** - Use the search endpoint (`https://api.fastly.com/public-search/docs?query=...`) to locate relevant pages by relevance. Use `markdown-index.json` when you need to enumerate or filter the full set of pages.
2. **Search result URLs need normalizing** - Rewrite the apex `fastly.com` host to the canonical `www.fastly.com` (leave `docs.fastly.com` as-is), strip any trailing slash or `#fragment`, then append `.md`. URLs in `markdown-index.json` already use `www.fastly.com` and include `.md`, so they can be used directly.
3. **Content is read-only** - These are exports of the live documentation.
4. **Updated daily** - Fresh content is synchronized from the main site.