LOG IN SIGN UP
Documentation

Adding CNAME records

To direct traffic from the Internet through Fastly instead of immediately through your site or application, you must create a DNS CNAME record for your domain that points to a Fastly hostname (e.g., nonssl.global.fastly.net) instead of directly to your domain (e.g., www.example.com). To do this, you must have access privileges that allow you to modify DNS records for your domain.

Choosing the right Fastly hostname for your CNAME record

The Fastly hostname you use for your DNS CNAME record will differ based on:

We've provided recommendations below based on these criteria.

Non-TLS hostnames and limiting traffic

If you don't require TLS support and only need to accept HTTP (Port 80) connections, use:

TLS-enabled hostnames

If you plan to accept both HTTP (port 80) and HTTPS (port 443) connections and you're using Fastly's free shared TLS wildcard certificate, use:

[name].global.ssl.fastly.net.

However, if you've purchased a Shared Certificate or Shared Wildcard Certificate service, use:

When you purchase one of these certificate services, Fastly Support will add your domains to a specific TLS Certificate, usually differentiated by a certificate letter (e.g., a, a2, b, c). You'll need to add the certificate letter to the beginning of the Fastly hostname noted above for use in your CNAME record. For example, if your domain was added to our a certificate the above hostname would become a.ssl.global.fastly.net.

Customer-specific hostnames

If you've purchased our Customer certificate hosting or SNI customer certificate hosting option, we'll assign you to a specific map that uses the following format:

[name].map.fastly.net.

Updating the CNAME record with your DNS provider

Once you've determined the appropriate Fastly hostname for your domain, create a DNS CNAME record for your domain. You'll need to follow your DNS provider's documentation for creating or updating a DNS CNAME record. The steps you follow will vary depending on your DNS provider's control panel interfaces.

If you run your own DNS server or are familiar with the format of BIND zone files, the CNAME record would look similar to this:

www.example.com.    3600    IN    CNAME   nonssl.global.fastly.net.

In the above example, the domain set up on Fastly is www.example.com., with a time-to-live (TTL) of 3600 seconds (1 hour), the Record Type is CNAME, and the Fastly hostname is nonssl.global.fastly.net. because TLS support isn't required and traffic will be routed through Fastly's entire global network.

Best practices when updating a DNS CNAME record


Additional resources:


Translations available [JA] 日本語