---
title: Working with CDN services
summary: null
url: >-
  https://www.fastly.com/documentation/guides/getting-started/services/working-with-cdn-services
---


Once you [create a CDN service](#creating-a-new-cdn-service), you can [edit and activate new versions](#editing-and-activating-versions-of-services) of your Fastly services that include refinements and updates to your configurations. The Fastly control panel also allows you to do [other things](#other-things-you-can-do) with existing Fastly services, like [compare them](#comparing-different-service-versions) to each other, [deactivate](#deactivating-a-service) or [reactivate](#reactivating-a-service) them, and [delete](#deleting-a-service) them.

## Before you begin

Before you create your first Fastly service, be sure you understand [how services and versions work](/guides/getting-started/services/about-services) and [service creation limits](/guides/getting-started/services/about-services#service-creation-limits). You'll also need to understand the Fastly [web interface controls](/guides/getting-started/navigating-fastly/about-the-web-interface-controls) before using them to work with your Fastly services.

> **HINT:** This guide includes instructions for creating and interacting with CDN services. Our [Compute documentation](/guides/getting-started/services/working-with-compute-services) provides more information on working with services that take advantage of Compute.

## Creating a new CDN service

You can create a new CDN service via the Fastly control panel. Use the steps below to quickly create a CDN service that uses standard defaults common to many customers.

> **HINT:** If you're not ready to fill out all of these fields or prefer to create a draft service immediately, click **Skip and go to service configuration**. We'll automatically create a draft version of a new service, and you can choose to keep or discard any changes you've already made to the service creation fields.

To create a new service:

1. <Partial name='step-login' inline />
1. Click **Create service** at the top right of the page, just below the primary navigation controls.
1. In the **Service name** field, enter a descriptive name for your service (e.g., `My Example Website Service`).
1. In the **Domain** field, enter the name of the domain you want Fastly to use to route requests to. Our guide to [working with domains](/guides/getting-started/domains/working-with-domains/working-with-domains) provides additional details.
1. In the **Host** field, enter the name of the host you plan to use as the backend or origin for your site. Our guide to [working with hosts](/guides/getting-started/hosts/working-with-hosts) provides additional details.
1. Review the **Recommended settings** that are enabled by default for your service and decide whether or not to disable them by clicking the appropriate setting switch to **Off**.
   * The **Override default host** setting enables [host override at the origin level](/guides/full-site-delivery/domains-and-origins/specifying-an-override-host#overriding-a-host-at-the-origin-level). Many customers creating services specify an override host at the same time, especially when using an origin that requires a specific hostname to be passed to it.
   * The **Default compression** setting enables [automatic compression](/guides/full-site-delivery/performance/enabling-automatic-compression) using a [default compression policy](/guides/full-site-delivery/performance/enabling-automatic-compression#enabling-the-default-compression-policy). Automatic compression on our edge servers can help you reduce the size of your assets so traffic can flow faster.
   * The **Force TLS & HSTS** setting enables the [HTTP Strict Transport Security (HSTS) security enhancement specification](/guides/full-site-delivery/domains-and-origins/forcing-an-https-redirect) through Fastly and forces modern web browsers to communicate only via the TLS protocol. If you leave this default setting enabled, be sure to create a TLS certificate for use with your domains. For more information, check out our [TLS documentation](/guides/security/tls).
1. Finally, do one of the following to finish creating your service:

   * Click **Activate** to create your service and activate it. A new version of your service will be created and [locked](/guides/getting-started/services/about-services#understanding-fastly-services-and-versions). You'll need to [clone](#editing-and-activating-versions-of-services) the service version to make additional edits to your service configurations.
   * Click **Save draft** to create your service in a draft state. You can continue editing your service configurations until you're ready to [activate](/guides/getting-started/services/working-with-cdn-services#editing-and-activating-versions-of-services)
1. [Test your service configurations](/guides/getting-started/domains/working-with-domains/working-with-domains#testing-a-domain) by opening `https://www.example.com.global.prod.fastly.net` in a new browser window, replacing `www.example.com` with your own website's domain name. Your website should appear, though it may take up to 60 seconds for new configuration settings to take effect. You can continue to explore various configuration settings for as long as you like before starting to serve traffic.
1. Once you've reviewed everything and are ready, complete your service setup and start serving traffic through Fastly by [setting your domain's CNAME DNS record](/guides/getting-started/domains/working-with-domains/working-with-cname-records-and-your-dns-provider) to point to Fastly.

### About the Service summary and Service configuration tabs

After you create your service, you'll see two tabs: the Service summary tab and the Service configuration tab.

The **Service summary** tab lets you review general service details including the [event log](/guides/account-info/user-and-account-management/reviewing-service-activity-with-the-event-log), duplicate (clone) service versions so you can edit them, and [purge content](/guides/full-site-delivery/purging). The Service summary tab also allows you to [compare differences](#comparing-different-service-versions) between two configuration versions.

The **Service configuration** tab contains the main controls for [editing](#editing-and-activating-versions-of-services) your service configurations. Specifically, you can:

* manage the [domains](/guides/getting-started/domains/working-with-domains/working-with-domains) used to route requests to a CDN service
* manage the [hosts](/guides/getting-started/hosts/working-with-hosts) used as backends for a site and how they should be accessed
* manage the [health checks](/guides/getting-started/hosts/working-with-health-checks) that monitor backend hosts
* enable certain Fastly products for the service, if you are [assigned the role of superuser or engineer](/guides/account-info/user-and-account-management/about-user-roles-and-permissions/#user-roles-and-what-they-can-do). Note that this will result in changes to your monthly bill.
* manage various request and cache settings, headers, and responses that control [how Fastly caches and serves content](/guides/full-site-delivery/caching/caching-best-practices) for a CDN service
* specify how [logging](/guides/integrations/streaming-logs/setting-up-remote-log-streaming) should be performed and where server logs should be sent
* create custom [Varnish configuration language](/guides/full-site-delivery/fastly-vcl/about-fastly-vcl) (VCL) files
* specify how [conditions](/guides/full-site-delivery/conditions/about-conditions) are mapped and used for a service at various times (e.g., during request processing, when Fastly receives a backend response, or just before an object is potentially cached)

## Editing and activating versions of services

With the appropriate permissions, you can activate configuration changes immediately and roll back those changes just as quickly should they not have the intended effect. Fastly locks versions of services you've already activated to make rollbacks safer and provide version control. You can duplicate (*clone*) any existing service version and edit that cloned version. You must *activate* new versions of services to deploy their configurations. Configuration changes are never automatically activated.

To clone a service version, follow these steps::

1. <Partial name='step-login' inline />
1. <Partial name='step-select-service' inline />
1. From the **Service configuration** tab, click **Clone**.

A new version of the service is created and appears in the [event log](/guides/account-info/user-and-account-management/reviewing-service-activity-with-the-event-log). You can immediately start making edits to this service.

You can also clone a service or select a service version to edit from the Service summary tab:

1. <Partial name='step-login' inline />
1. <Partial name='step-select-service' inline />
1. From the **Edit configuration** menu, select the appropriate service configuration action:
   * Select **Clone version *[version number]* (active)** to clone the active version of the service for editing.
   * Select **Edit version *[version number]* (latest draft)** to edit the latest draft of the service.

To activate a service version, follow these steps:

1. <Partial name='step-login' inline />
1. <Partial name='step-select-service' inline />
1. From the **Activate** menu on the **Service configuration** tab, select **Activate on Production**. The new version of the service is activated and appears in the [event log](/guides/account-info/user-and-account-management/reviewing-service-activity-with-the-event-log).

## Switching between services and service versions

To switch between services associated with your account, follow these steps:

1. <Partial name='step-login' inline />
1. <Partial name='step-select-service' inline />
1. From the **Service summary** or **Service configuration** page, click the switcher <span class="inline-icons"><img src="/img/icons/chevron-down.png" alt="Chevron down icon" /></span> to the right of the service name.

   ![The service switcher](/img/service-switch-selection.png)

1. Select the appropriate service from the list that appears.

To switch between versions of a specific service, follow these steps:

1. From the **Service configuration** page, click the switcher <span class="inline-icons"><img src="/img/icons/chevron-down.png" alt="Chevron down icon" /></span> to the right of the version number.

   ![The service version switcher](/img/service-version-selection.png)

1. Select the appropriate version from the list that appears.

## Deleting a service

Fastly allows you to delete any service you create, along with all of its versions. Fastly does not offer a way to delete specific versions of a service, however. Service versions are meant to be a historic log of the changes that were made to a service. To undo changes introduced by a particular service version, you can always go back to a previous version and [reactivate](#reactivating-a-service) or clone a new service version based on any old version.

To delete any service along with all of its versions, follow the steps below:

1. <Partial name='step-login' inline />
1. <Partial name='step-select-service' inline />
1. From the **Options** menu, select **Deactivate**.
1. Enter the name of the service and click **Confirm and deactivate** to confirm you want to deactivate your service and acknowledge that you no longer want to serve traffic with it.
1. From the **Options** menu, select **Delete service** and then click **Confirm and delete** to delete the service.

> **WARNING:** To minimize the risk of unauthorized use of your domains, we strongly recommend modifying or deleting any [DNS CNAME records](/guides/getting-started/domains/working-with-domains/working-with-cname-records-and-your-dns-provider) pointing to the Fastly hostname associated with the deleted service. Follow the instructions on your DNS provider's website.

## Other things you can do

In addition to [creating](#creating-a-new-cdn-service) or [editing](#editing-and-activating-versions-of-services) services, you can [rename](#renaming-services) them and [delete](#deleting-a-service) them. You can also [stage](#staging-service-versions), [deactivate](#deactivating-a-service), or [reactivate](#reactivating-a-service) specific versions of them.

### Renaming services

To rename your service, follow the steps below:

1. <Partial name='step-login' inline />
1. <Partial name='step-select-service' inline />
1. From the **Options** menu, select **Edit service name**.
1. In the **Service name** field, enter a new service name.
1. Click **Apply**. The newly renamed service name appears.

### Staging service versions

Our [Staging documentation](/guides/getting-started/services/working-with-staging) provides more information on testing changes to service configurations on a staging network before deploying them to production.

### Adding comments to service versions

Service versions can include comments to label them (e.g., to identify reasons for changes in that version). You can add and update version comments on both locked and activated service versions.

1. <Partial name='step-login' inline />
1. <Partial name='step-select-service' inline />
1. From the Service configuration tab, click **Add version comment**.

   ![the add comment link](/img/add-version-comment.png)

1. In the **Comment** field, enter a meaningful comment for the version.
1. Click **Save**. The truncated version of the comment appears where the Add comment link used to be.

   ![the service version](/img/version-comment-text.png)

You can view service version comments at any time by clicking the version switcher to the right of the version number. Version comments also appear in the [event log](/guides/account-info/user-and-account-management/reviewing-service-activity-with-the-event-log) to help with account activity monitoring.

### Comparing different service versions

To compare two versions of a service, follow the steps below:

1. <Partial name='step-login' inline />
1. <Partial name='step-select-service' inline />
1. Click **Diff versions**. The Diff versions page appears.

   Removals are highlighted in red and the additions and changes are highlighted in green. Any large blocks of unaffected configuration lines can be expanded and viewed or collapsed and hidden by clicking on the plus <span class="inline-icons"><img src="/img/icons/plus.png" alt="Plus icon" /></span> sign to the left of the actual changes, next to the line numbers.

   ![an example comparison of two service versions](/img/diff-versions-example.png)

   > **HINT:** You can change the compared service versions by clicking **Switch versions** and selecting a different version number in the menu that appears.

### Deactivating a service

To deactivate a service, follow the steps below:

1. <Partial name='step-login' inline />
1. <Partial name='step-select-service' inline />
1. From the **Options** menu, select **Deactivate**.
1. In the **Enter service name** field, enter the exact service name to deactivate.
1. Click **Confirm and deactivate** to confirm you want to deactivate your service and acknowledge that you no longer want to serve traffic with it.

> **WARNING:** To minimize the risk of unauthorized use of your domains, we strongly recommend modifying or deleting any [DNS CNAME records](/guides/getting-started/domains/working-with-domains/working-with-cname-records-and-your-dns-provider) pointing to the Fastly hostname associated with the deactivated service. Follow the instructions on your DNS provider's website.

You can also [activate or deactivate a service via the API](/reference/api/services/version/). Did you accidentally delete a service? [We can help](#getting-help-with-accidental-service-deletions).

### Reactivating a service

To reactivate a service, follow the steps below:

1. <Partial name='step-login' inline />
1. <Partial name='step-select-service' inline />
1. <Partial name='step-click-edit' inline />
1. From the **Activate** menu, select **Activate on Production**. The service is reactivated.
1. If you removed the DNS CNAME records for the service's domains when you deactivated the service, you should [add new DNS CNAME records](/guides/getting-started/domains/working-with-domains/working-with-cname-records-and-your-dns-provider) now.

### Getting help with accidental service deletions

Services can be [deactivated](#deactivating-a-service) or [deleted](#deleting-a-service). Deactivated services can be reactivated at any time, but once they've been deleted you must [contact Customer Support](https://support.fastly.com) to have them restored. When sending your request, remember to include:

* your [customer ID](/guides/account-info/user-and-account-management/changing-company-profile-details)
* your company name
* your service ID (the name of the service you want restored)

Customer Support will notify you when your service has been restored.

## What's next

Learn more about working with [domains](/guides/getting-started/domains/working-with-domains/working-with-domains), [hosts](/guides/getting-started/hosts/working-with-hosts), and [health checks](/guides/getting-started/hosts/working-with-health-checks) as you continue to refine versions of your service configurations.

## Related content

* [About services](/guides/getting-started/services/about-services)
* [Service API documentation](/reference/api/services/service/)
