Customize rules and behaviors

Before you begin, you need to create a property so requests for your website content and applications resolve to edge servers on the global network. Once it's created, you can configure hostname settings for your property.

📘

If you are planning to use Dual Stack RSA+ECDSA, you'll need to create a custom certificate.

Find out more about how to Create and edit certificates.

Your property configuration includes default rules based on the product you select when you create a new property. For an API Acceleration property POST, PUT, PATCH, and DELETE are enabled by default. Define the match criteria and enable caching for cacheable content.

📘

Keep in mind these best practices and tips when you are setting up your API Acceleration property.

Depending on what modules are available in your contract, you can enable additional features. You'll add these behaviors via the Add Rule and Add Behavior buttons to take advantage of various API Acceleration features.

Origin server Hostname

This is the hostname of the server that contains content that you want to be delivered from the edge network. When you set the origin in your configuration, you also assign an origin hostname to use in your DNS as described in Identify origin server.
If your application uses NetStorage, you will also need:

  • NetStorage Download Domain - the name of the domain set up for use with this application on your NetStorage account.
  • CP Code Root Directory - the Reporting CP Code for the NetStorage account.

Forward HOST Header

The Forward HOST Header is the hostname the server forwards to the origin. This header is included in the HTTP HOST request header. The Web server on your origin uses this value to determine what content to send. Typically, the expected host is the same name as the digital property received in the request. However, it may be customized.

When determining which Forward HOST Header to use, your options include the HTTP Host Header included in the original request, the origin server hostname you specified in this feature, or a custom host header.

Origin SSL Certificate Name

If you are using the Secure Option, enter the SSL certificate that is specified for the configuration. This certificate should carry the same common name as the primary digital property.

Origin Server Port

You have the option of setting a non-standard, unrestricted port that servers will use to communicate with the origin.

Root Directory

This setting is only for configurations that do not use the root directory of the origin server host. Complete this field only if you are using a subdirectory as your root directory.

Compression Support

Compression is important in optimizing performance. If your origin supports compression/gzip, you can direct the server to send the Accept Encoding: gzip HTTP request header.

Select this option only if your origin server supports both compression/gzip and the Accept Encoding: gzip request header.

Cache Key - Origin Server

Our servers use the cache key to identify the content in caches. Assuming your application includes at least some cacheable content, by default ​Akamai​ uses keys based on the entire origin uniform resource identifier (URI) path and query string, if there is one.

If you want to use a cache key, you can select one of these options:

  • Origin Server Hostname - Treats all objects requested using this origin hostname, path, and query string as the same object. This setting includes the content served from any other configuration with the same origin hostname.
  • Digital Property/Incoming Hostname - Select this option if your origin is a virtual server. For each digital property, this option assigns a unique cache key to objects requested with the same path and query string. For example, once cached, these objects would be treated as different objects:
  • Custom Value - Allows a value in the cache key that is neither the origin hostname nor the digital property. You can use this option to match the cache key with one specified in another configuration.

Ignore Case

The server names are case-sensitive by default, but you can set your configuration to be case insensitive. Setting this feature is an instruction to ignore case in operations like the creation of cache index keys. This means that the URL and any associated query key is converted to all lower case when the cache key is created. As a result, URLs that fetch the same object using a different case will now cache the object only once rather than caching each uniquely-cased URL.

Last Mile Acceleration

Apply Last Mile Acceleration, which supports gzip compression, to files of various types to increase performance.

Last Mile Acceleration examples by file type

File type

Example

Content with character encoding

Content-type:application/x-javascript; charset=UTF-8

HTML

Content-type: text/html

JavaScript files

Content-type: application/x-javascript

Style sheets

Content-type: text/css

Caching: Time-to-Live/Max-Age settings

Time-to-Live (TTL) rules, also known as Max-Age rules, are a set of options by which the content objects are either cached or not cached by ​Akamai​ edge servers. You configure the TTL/Max-Age setting via Property Manager as part of the Caching behavior. You can choose units of seconds, minutes, hours, or days for the TTL/Max-Age setting.

📘

Entering a setting of 0 means that the content will be cached, but it must be revalidated with the origin before serving.

If your caching behavior is set to no-store or bypass-cache, the Edge Server sends "cache-busting" headers downstream. This table provides additional information on these options.

Caching behavior options

Caching Behavior

Description

no-store

When you select this option, you disallow caching in platform servers and in downstream caches.

bypass-cache

When you select this option, you do notserve content from cache. Instead, a request is sent to the origin, and caching in downstream caches is disallowed.

For example, this option may be useful when using central authorization, as it will bypass the cache for the client request. Once users are authenticated, they are redirected to cached content.

Browser Cache-Control Headers

Allows you to specify the caching response headers sent to the end-user browser based on the headers generated at your origin. If you enable this feature, you can:

  • Remove Default cache-busting headers and add Cache-Control = Private. For no-stored content, this replaces the standard cache-busting headers with the Private directive.
  • Pass through the origin's Cache-Control headers to the browser. Use the same Cache-Control headers as the origin sends in the response that is sent to the end user.
  • Add cache-busting headers to cacheable content and remove the default caching headers. Use this to replace any caching instructions that would go to the end user's browser with no-store instructions.
  • Set a fixed TTL in cache in the Cache-Control header. This option removes the Expires header. Allows you to set a specific length of time the content should be available in the browser cache. This cancels any expire in the time/date instructions.
  • Pass through all origin cache-control headers. Passes through all caching instructions from origin, not just those sent with the Cache-Control header.

Cache Key: Query String

Provides controls for the query string parameters that determine the cache key for a set of objects. By default, the server includes the query string portion of a request URL in the cache key. You can increase the cache hit rate for your objects by selectively including, or excluding, the query string parameters that define the uniqueness of the object.

You can choose to form the cache key by:

  • ignoring all query arguments;
  • ignoring specific query arguments by name; or
  • including specific query arguments by name, and ignoring all others.

Centralized / Basic Authentication

Directs the server to forward every client request to the origin server for authorization. If the origin server is not available, the server will serve an error to the client.

Control Access by Referrer Domain

With referrer checking enabled, the edge server can check the referrer header sent in the client request against a list, and reject requests that do not match.

Control Access by URL or IP

Allows you to authorize or deny access to certain content based on the client IP address, path, and /or file extension.

Connection Timeouts and Persistent Connections

You can modify timeouts for certain connections between the Edge Server and the origin only with the assistance of a service representative. The timeouts that may be modified include the HTTP Read timeout and, in some cases, the Edge-to-Origin persistent connection (PCONN) timeout.

Content Targeting

Allows you to customize content based on parameters related to the end user's connection, for example geographical location and connection speed. Learn more about Content Targeting.

CP Code Rules

For particular paths or file extensions, CP code rules allow you to override either the default CP code or per-digital property settings with a different CP code. This type of override can:

  • be useful for customizing the data aggregation for your reports, and
  • allow you to enhance purge-by-CP code functionality by tagging specific content with a unique CP code.

Device Characterization

Provides additional ways to accelerate and optimize your content by taking into account a requesting device's characteristics. Learn more about Device Characterization.

DNS Asynchronous Refresh

Allows you to asynchronously update the origin DNS entry. The server will use a stale DNS response to serve the client, and at the same time start a refresh of the entry. If the DNS entry is more than two hours past its expiration, the entry will be refreshed before it is used to serve the client. When a DNS entry has expired, DNS Refresh helps avoid the unnecessary DNS name resolution delay. This feature is used to ensure optimal performance and reduce potential issues with the origin's DNS entries.

Edge Server Identification

Allows you to identify, through the use of a cookie, whether a request came from an edge server.

Honor HTTP Cache-Control and Expires Headers

Allows the use of:

  • HTTP Cache-Control response headers, associated with origin objects, to override max-age settings in this configuration, and
  • HTTP Expires response headers to set the expiration date and time.
    Note: You cannot override no-store settings with Cache-Control or Expires headers.

Mobile Detection and Redirect

Identifies incoming requests originating from mobile devices and, based on match rules that you define, sends those requests to the optimal site for the device. When an edge server receives an HTTP request, Mobile Detection and Redirect uses Device Characterization technology to identify the device. If the requesting device is mobile, then Mobile Detection and Redirect will:

  • look in the site's configuration file for user-defined match rules;
  • get the device's characteristics from Device Characterization; and
  • compare the device details, and the details of the original request, to the match rules' detection settings.

Learn more about Mobile Detection and Redirect.

Modify Path Rules

Normally the server requests content from the origin server by forwarding a request that includes the client request URL. This feature allows you to direct the request to a different location on the origin server and/or change the value of the origin server. The location you specify must be the complete URL beginning with a forward slash.

Redirect

Allows an edge server to respond to a client request with a redirect without having to contact the origin server. The redirect can send the user to a different URI path and/or hostname. This feature can allow you to offload requests from your origin server.

Remove Vary Header

By default, an object with an HTTP Vary header in the response is not cached. Some applications add this header even when the content does not vary. In that case, you can select this option to remove the header so that the content may be cached.

Set Cookies

The servers can generate a unique or fixed-name cookie to send to the client without the need to contact the origin server. The cookie is set only if it is not already present in the client request. The unique cookie is a useful way to identify the number of unique users or analyze client sessions within a website.

Site Failover

Lets you specify content to be served in the event that the origin server cannot be reached, or the content either does not exist or has expired. You can configure this feature to:

  • serve a redirect to the client browser, or
  • recreate the request with a new hostname, which allows the server to apply new features and potentially fetch content from a different origin server.

Learn more about Site Failover.

Modify Via Header

Remove or rename HTTP Via headers in origin requests.

The Modify Via Header behavior lets you remove or rename HTTP Via headers in requests to the origin. This is beneficial if you want to remove headers that impact offload. It is on by default if you're using API Acceleration. This behavior can be added in the default rule and in match rules with any condition.

IMAGE_STUBIMAGE_STUB

You can define the string value with the Rename Header option, but the name cannot contain spaces or these characters: ()<>@,;:"/[]?{}

IMAGE_STUBIMAGE_STUB

Tiered Distribution

Offload origin traffic for improved performance.

The Tiered Distribution behavior lets you offload traffic from your origin to improve API performance. API Acceleration uses a custom set of parent maps for optimal performance. Enable Tiered Distribution for your API Acceleration properties. Learn more about Tiered Distribution.

For objects with 0 TTLyou should use SureRoute for Performance instead of Tiered Distribution. Learn more about SureRoute.

Origin IP Access Control List

Protect your origin from malicious activity.

You can configure your property to accept requests from a limited set of IPs within an access control list. This ensures that only ​Akamai​ edge servers can access the origin through your firewall. To do this, enable Origin IP Access Control List in Property Manager.

IMAGE_STUBIMAGE_STUB

Once your property is activated, you can add the CIDR list to your origin IP access control list. Learn more about setting up Origin IP Access Control in Property Manager.

Graph QL

Add the GraphQL caching behavior to your API Acceleration property.

GraphQL is a query language for your API. GraphQL APIs get all the data your application needs in a single request. You can use Graph QL to detect errors and uncacheable content and increase cache hit rate for open APIs.

Add the GraphQL caching behavior to your API Acceleration property to control how Akamai handles caching.


Did this page help you?