---
title: Responses tutorial
summary: null
url: >-
  https://www.fastly.com/documentation/guides/full-site-delivery/responses/responses-tutorial
---

Fastly allows you to create custom HTTP responses that are served directly from the cache without storing the page on a server. Responses are commonly used to serve small static assets that seldom change and maintenance pages that are served when origins are unavailable. This tutorial shows you how to create your own responses.

## Before you begin

Be sure you learn about the [web interface controls](https://www.fastly.com/documentation/guides/getting-started/navigating-fastly/about-the-web-interface-controls) and how to [work with services](https://www.fastly.com/documentation/guides/getting-started/services/about-services) before you start working with your domains.

## Creating a quick response

Fastly provides features that allow you to quickly enable and configure responses for a [robots.txt file](https://www.fastly.com/documentation/guides/full-site-delivery/responses/creating-and-customizing-a-robots-file#creating-a-robotstxt-file) and [404 and 503 errors](https://www.fastly.com/documentation/guides/full-site-delivery/responses/creating-error-pages-with-custom-responses#creating-error-pages-for-404-and-503-errors). For more information, see our guides on [creating and customizing a robots.txt file](https://www.fastly.com/documentation/guides/full-site-delivery/responses/creating-and-customizing-a-robots-file) and [creating error pages with custom responses](https://www.fastly.com/documentation/guides/full-site-delivery/responses/creating-error-pages-with-custom-responses).

## Creating an advanced response

You can create an advanced response to specify the HTTP status code, MIME type, and content of the response. An advanced response has three basic attributes:

- Status - An HTTP status code to include in the header of the response
- Response - The content to be served when delivering the response
- Description - A human readable identifier for the response

By setting these three attributes and adding a condition to the response, you can very quickly get one up and running on your service. To create an advance response, follow the steps below:

1.   Log in to the [Fastly control panel](https://manage.fastly.com).

2.   From the [**Home**](https://manage.fastly.com/home) page, select the appropriate service. You can use the search box to search by ID, name, or domain.

3.   Click **Edit configuration** and then select the option to clone the active version.

4.   Click **Content**.

5. Click **Set up advanced response**.

   ![the text editor area of the Synthetic Response window](/img/new-synthetic-response-my-first-response.png)

6. Fill out the **Create a synthetic response** fields as follows:
   - In the **Name** field, enter a human-readable name for the response (e.g., `My first response`).
   - From the **Status** menu, select the appropriate status (e.g., `200 OK`).
   - In the **MIME Type** field, enter the content type of the response (e.g., `text/html`).
   - In the **Response** field, enter the response you want to appear when the conditions are met.

7. Click **Create** to create your custom response.

Your new response appears in the list of responses.

### Adding conditions

To add a [condition](https://www.fastly.com/documentation/guides/full-site-delivery/conditions/about-conditions), follow the steps below:

1. Click **Attach condition** to the right of the new response.

   ![the Apply if field  associated with a new response](/img/new-apply-if-condition-response.png)

2. Fill out the **Create a new condition** fields as follows:
   - From the **Type** menu, select the type of condition you want to create.
   - In the **Name** field, enter a human-readable name for the condition so that it can be easily identified in the future.
   - In the **Apply if** field, enter the condition under which the new response occurs. The condition should take the following format: `req.url ~ "^/construction/"` equals the request condition you're creating the response for.
   - In the **Priority** field, enter a priority if needed. Condition priorities are only needed in "interesting" cases, and can usually be left at the default "10" for all response conditions.

3. Click **Save and apply to**.

4.   From the **Activate** menu, select **Activate on Production** to deploy your configuration changes.

Fastly now serves your custom response page when the condition is met.

## Related content

- [Response object API documentation](https://www.fastly.com/documentation/reference/api/vcl-services/response-object/)
