Working with domains

This guide describes how to take the public name for your website or application and add it to Fastly where you can associate it with a Fastly service. You can add, edit, or remove domains from your service at any time.

TIP

You can also work with domains using the Fastly API

Before you begin

Before you create your first domain, be sure you understand how domains are used with Fastly and domain creation limits. You'll also need to understand the Fastly web interface controls before using them to work with domains.

Creating a domain for the first time

Follow the steps below to add a domain to your service for the first time:

  1. Log in to the Fastly web interface.
  2. From the 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.

    the Create a Domain page

  4. Fill out the domain creation fields as follows:

    • In the Domain Name field, enter the public domain you want users to visit.
      TIP

      Due to limitations in the DNS specification, Fastly doesn't recommend using apex or second-level domains. An example of an apex domain is example.com rather than www.example.com.

    • (Optional) In the Comment field, enter a comment that describes the domain.
  5. Click the Add button. Your new domain appears in the list of domains.

  6. Click Activate to deploy your configuration changes.

Once you create a domain, you'll want to test it before adding a CNAME DNS record for your domain name to begin routing traffic through Fastly.

Creating additional domains

Follow the steps below to add additional domains to your service:

  1. Log in to the Fastly web interface.
  2. From the 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.

    the Domains page

  4. Click Create domain.

    the Create a Domain page

  5. Fill out the domain creation fields as follows:

    • In the Domain Name field, enter the public domain you want users to visit.
      TIP

      Due to limitations in the DNS specification, Fastly doesn't recommend using apex or second-level domains. An example of an apex domain is example.com rather than www.example.com.

    • (Optional) In the Comment field, enter a comment that describes the domain.
  6. Click Add. Your new domain appears in the list of domains.

  7. Click Activate to deploy your configuration changes.

Once you create a domain, you'll want to test it before adding a CNAME DNS record for your domain name to begin routing traffic through Fastly.

Testing a domain

After you activate your service configuration, but before you change your DNS entries to send your domain to our servers, you can check to see how your service is pulled through our network. Testing your domain can help you identify DNS issues or problems with your Fastly configuration.

You can test your domain using a link in the web interface by following the steps below. Alternatively, you can test domains using command line utilities.

To use the web interface to test your domain:

  1. Log in to the Fastly web interface.
  2. From the 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.

    the Domains page

  4. Click Test domain next to the domain you want to test.

  5. Verify that your website appears in a new tab in your web browser.

Deleting a domain

Follow the steps below to delete a domain from your service:

  1. On the Domains page, click the trash next to the domain you want to delete.
  2. Click Confirm and delete to confirm you want to delete your domain.
  3. Click Activate to deploy your configuration changes.
IMPORTANT

To minimize the risk of unauthorized use of your domains, we strongly recommend modifying or deleting any DNS CNAME records pointing to the Fastly hostname associated with the deleted domain. Follow the instructions on your DNS provider's website.

What's next

When you're ready to route production traffic through Fastly, update your domain's CNAME record to begin routing client traffic through Fastly services instead of directly to your origin.

You may also want to learn more about working with hosts and working with health checks as you continue to refine versions of your service configurations.

Was this guide helpful?

Do not use this form to send sensitive information. If you need assistance, contact support. This form is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.