We've been making changes to how we organize and display our docs. Our work isn't done but we'd love your feedback.
Getting started
Basics
Domains & Origins
Performance

Configuration
Basics
Conditions
Dictionaries
Domains & Origins
Request settings
Cache settings
Headers
Responses
Performance
Custom VCL
Image optimization
Video

Security
Access Control Lists
Monitoring and testing
Securing communications
TLS
Web Application Firewall

Integrations
Logging endpoints
Non-Fastly services

Diagnostics
Streaming logs
Debugging techniques
Common errors

Account info
Account management
Billing
User access and control

Reference

    Working with services

      Last updated April 29, 2019

    A service is a user-defined set of caching rules and behavior for a website or application. The Fastly web interface allows you to create new services or edit existing ones and then activate new versions of them that include your changes once you have things configured the way you want. The web interface also allows you to do other things with existing services, like rename them, compare them to each other, deactivate or reactivate them, and delete them.

    Creating a new service

    You might want to create a new service version to do things like:

    Creating a service requires you to first create a domain and then a host.

    Creating a new domain

    To create a new domain, follow the steps below:

    1. Log in to the Fastly web interface and click the Configure link.
    2. Click the Create service button. The empty state page appears.
    3. Click the Domains link. The Domains page appears.
    4. Click the Create domain button. The Create a domain page appears. Our guide to working with domains describes more about domains and what you can do with them.

      Create a domain

    5. Fill out the Create a domain fields as follows:
      • In the Domain Name field, type the name users will type in their browsers to access your site.
      • In the Comment field, optionally type a comment that describes your domain.
    6. Click the Create button. A new domain appears on the Domains page but the Activate button remains inactive until you add a host

    Creating a new host

    Once you create your domain, you can create a new host by following the steps below:

    1. Click the Origins link. The Origins page appears.
    2. Click the Create a host button. The Hosts field appears.

      Create a host

    3. Fill out the Hosts field by typing the hostname or IP address of your origin server. Entering a hostname automatically enables Transport Layer Security (TLS) and assigns port 443. Entering an IP address disables TLS and assigns port 80.
    4. Click Add to add your host.

    Editing a host

    After you've created your host, you can edit the host's details by following the steps below:

    1. In the Hosts area, click the pencil icon next to the host you want to edit. The Edit this host page appears.

      the Edit this host page

    2. Fill out the Edit this host fields as follows:
      • In the Name field, type the name of your server (for example, My Origin Server). This name is displayed in the Fastly web interface.
      • In the Address field, optionally edit the IP address (or hostname) of your origin server.

      Although we recommend setting up TLS when you set up a host, it's not required for your initial exploration and configuration testing.

      Transport Layer Security for service

    3. Fill out the Transport Layer Security (TLS) area as follows:
      • Leave the Enable TLS? default set to Yes if you want to enable TLS and secure the connection between Fastly and your origin. To enable TLS, a valid SSL certificate must be installed on your origin server and port 443 (or the specified port) must be open in the firewall. You can select No if you do not want to use TLS.
      • Leave the Verify certificate? default set to Yes if you want to verify the authenticity of the TLS certificate. Selecting No means the certificate will not be verified.

      • In the Certificate hostname field, type your certificate hostname associated with your TLS certificate. This value is matched against the certificate common name (CN) or a subject alternate name (SAN) depending on the certificate you were issued.
      • In the SNI hostname field, optionally specify your SNI hostname. This is generally only required when your origin is using shared hosting, such as Amazon S3, or when you use multiple certificates at your origin. See Setting the TLS hostname for more information. * In the TLS CA certificate field, optionally include your TLS CA certificate. You may want to provide the CA certificate if you're using a certificate that is either self-signed or signed by a Certificate Authority (CA) not commonly recognized by major browsers. See Specifying a TLS CA certificate for more information.
    4. Click the Update button. The new service appears in the list of services available.
    5. Click the Activate button at the top right of the screen. A confirmation window appears.
    6. Click the Confirm and Activate button to confirm you want to activate your new service. The Configure page appears displaying details about the configuration settings of the first version of your new service.

    Testing your configuration experiments

    As you experiment with service configurations, you can test their success before you start serving traffic through Fastly. Simply open http://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, testing things repeatedly as you go.

    Serving traffic through Fastly

    Once you’re ready, all you need to do to complete your service setup and start serving traffic through Fastly is set your domain's CNAME DNS record to point to Fastly. For more information, see the instructions in our Adding CNAME records guide.

    Editing your services

    You might want to edit a version of an existing service to do things like:

    Editing and activating versions of services

    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, active or inactive, and edit that cloned version. You must "activate" new versions of services in order to deploy their configurations. Configuration changes are never automatically activated.

    To make changes to a service and activate a new version, follow the steps below:

    1. Log in to the Fastly web interface and click the Configure link. The Configure page appears.

      The Configure page

    2. Click the Edit Configuration button. The Edit Configuration menu appears.

      The Configuration button

    3. 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.

      The service version page appears, listing the version.

    4. Click Activate. The new version of the service is activated and appears in the event log.

    Other things you can do

    In addition to creating or editing services, you can view all your services, view a condensed list of your services, star them to pin them to the top of the All services page, rename them, compare versions of them, deactivate or reactivate specific versions of them, and delete them.

    Viewing all services

    To view all your services, log in to the Fastly web interface. The All services page appears displaying a summary of all your services, sorted by requests per second.

    the All services page

    Viewing a condensed list of all services

    If you have a lot of services, you can view a condensed list of all your services. On the All services page, click the icon with three lines above the list of services.

    the condensed list of services

    Star services

    If you have a lot of services, you can star the services you use most often to pin them to the top of the All services page. Click the star next to a service to pin it to the top of the page.

    the list of services with one pinned

    Renaming services

    To rename your service, follow the steps below:

    1. Log in to the Fastly web interface and click the Configure link.
    2. From the service menu, select the appropriate service.
    3. Select the service name text box and type a new service name.

      renaming a service

    4. Press enter. The newly renamed service name appears.

    Comparing different service versions

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

    1. Log in to the Fastly web interface and click the Configure link.
    2. From the service menu, select the appropriate service.
    3. Click the Diff versions link located under the Service ID.

      selecting Diff versions

      The Diff versions page appears. Removals are highlighted in red with a minus sign at the beginning of the line. Additions are highlighted in green with a plus sign at the beginning of the line.

      an example comparison of two service versions

    You can change the compared service versions by selecting a different version number in the selection menus.

    Deactivating a service

    To deactivate a service, follow the steps below:

    1. Log in to the Fastly web interface and click the Configure link.
    2. From the service menu, select the appropriate service.
    3. Click the Options button and select Deactivate.

      deactivate a service

      The deactivate service warning appears.

      the Deactivate Service warning

    4. Click the Confirm and deactivate button to confirm you want to deactivate your service and acknowledge that you no longer want to serve traffic with it.

    You can also activate or deactivate a service via the API. Did you accidentally delete a service? We can help.

    Reactivating a service

    To reactivate a service, follow the steps below:

    1. Log in to the Fastly web interface and click the Configure link.
    2. From the service menu, select the appropriate service.
    3. Click the Configuration button and then select Clone active. The Domains page appears.
    4. Click Activate. The service is reactivated.
    5. If you removed the DNS CNAME records for the service's domains when you deactivated the service, you should add new DNS CNAME records now.

    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 an 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 it 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. Log in to the Fastly web interface and click the Configure link.
    2. From the service menu, select the appropriate service.
    3. Click the Options button and select Deactivate. The deactivate service warning appears.
    4. Click the Confirm and deactivate button to confirm you want to deactivate your service and acknowledge that you no longer want to serve traffic with it.
    5. Click the Options button again and select Delete.

      delete a service

      The confirm delete window appears.

      the Confirm Delete window

    6. Click the Confirm and delete button to confirm that you want to delete the service.

    Adding comments to service versions

    Service versions can include comments to label them or identify work in them. You can add and update version comments on both locked and activated service versions.

    1. Log in to the Fastly web interface and click the Configure link.
    2. From the service menu, select the appropriate service.
    3. Click the Configuration button and then select Clone active. The Domains page appears.
    4. Click the Add comment link on the upper, right side of the web interface.

      the add comment link

      The comment window appears.

      the version comment window

    5. In the Comment field, type a meaningful comment for the version.
    6. Click Save. The truncated version of the comment appears where the Add comment link used to be.

      the service version

    Getting help with accidental service deletions

    Services can be deactivated or deleted. Deactivated services can be reactivated at any time, but once they've been deleted you must contact Customer Support to have them restored. When sending your request, remember to include:

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

    Back to Top