# Custom Pages

> Platform versions: this page applies to API v4.x only, not to API v3.x.
> Equivalent page for API v3.x: [Error Responses](/en/documentation/platform/custom-pages/error-responses.md)

**Custom Pages** is a Platform Resource that replaces the error response a [Connector](/en/documentation/platform/connectors/) returns with a page of your own, on Azion's distributed infrastructure. A custom error page is a document a site serves in place of a server's default error response for one status code, such as `404`. Use Custom Pages to show your own page for a missing resource or a timed-out origin, set its cache time, or change its status code. Also use [Custom page settings](/en/documentation/platform/custom-pages/settings/) to look up the fields of a set, its pages, and the status codes a page replaces.

[Quickstart](/en/documentation/platform/custom-pages/quickstart/)

[Custom Pages reference](/en/documentation/platform/custom-pages/reference/)

## Request path

Creating a custom page set changes no response: a [Workload](/en/documentation/platform/workloads/) uses a custom page set only once that Workload's deployment sets that custom page set.

This diagram follows a response from the Connector's status code to what the client receives. Solid arrows carry requests, and dotted arrows carry responses. Each label starts with the number of the step it belongs to.

```mermaid
%%{init: {"layout": "elk", "elk": {"preset": "modelOrder", "keepEntryNodeOnTop": true}, "themeVariables": {"fontSize": "13px"}, "flowchart": {"nodeSpacing": 24, "rankSpacing": 36, "padding": 8, "wrappingWidth": 150, "useMaxWidth": true}, "sequence": {"width": 120, "actorMargin": 30, "useMaxWidth": true}}}%%
flowchart TD
  Client(["Client"])
  WL["Workload"]
  App["Application"]
  Conn["Connector"]
  Origin[["origin"]]
  Set["custom page set"]
  PConn["page's Connector"]
  Client -->|"1. request"| WL
  WL -->|"1. request"| App
  App -->|"1. request"| Conn
  Conn -->|"1. request"| Origin
  Origin -.->|"1. status code"| Conn
  Conn -.->|"2. look up the code"| Set
  Set -.->|"2. no page: response unchanged"| Client
  Set -.->|"2. no page, listed code: default page"| Client
  Set -->|"3. page found: fetch uri"| PConn
  PConn -.->|"3. content"| Set
  Set -.->|"4. page in place, no redirect"| Client
```

1. The Workload forwards the request to the [Application](/en/documentation/platform/applications/) that its deployment sets. The Application sends the request to the origin through a Connector, and the Connector answers with a status code.
2. Azion looks for a page with that code in the custom page set that the deployment sets. When the set has no page for the code, the client receives the Connector's response unchanged, except for the status codes `400`, `401`, `403`, `406`, `500`, `502`, `503`, and `504`, which receive Azion's default error page.
3. When a page matches, Azion fetches its content from the page's Connector at the page's `uri`. The page's `ttl` sets its cache time.
4. The client receives that content in place, with no redirect and no `Location` header. The status is the page's `custom_status_code`, when one is set.

---

## Next steps

- [Quickstart](/en/documentation/platform/custom-pages/quickstart.md): Replace your origin's 404 with a page of your own.
- [How it works](/en/documentation/platform/custom-pages/how-it-works.md): Understand which responses a custom page set replaces.
- [Guides and tutorials](/en/documentation/platform/custom-pages/guides.md): Complete a specific error page task.
- [Limits](/en/documentation/platform/custom-pages/limits.md): Look up where Custom Pages stops and the value of each limit.
- [Troubleshooting](/en/documentation/platform/custom-pages/troubleshooting.md): Find the cause when a set is refused or an error page does not appear.
- [Glossary](/en/documentation/platform/custom-pages/glossary.md): Look up a term the Custom Pages pages use.
