Configuring custom domains to handle open and click tracking
When you use event publishing to capture open and click events, Amazon SES makes minor changes to the emails you send. To capture open events, SES adds a 1 pixel by 1 pixel transparent GIF image in each email sent through SES which includes a unique file name for each email, and is hosted on a server operated by SES; when the image is downloaded, SES can tell exactly which message was opened and by whom.
By default, this pixel is inserted at the bottom of the email; however, some email
providers’ applications truncate the preview of an email when it exceeds a certain size and
may provide a link to view the remainder of the message. In this scenario, the SES pixel
tracking image does not load and will throw off the open rates you’re trying to track. To
get around this, you can optionally place the pixel at the beginning of the email, or
anywhere else, by inserting the {{ses:openTracker}}
placeholder into the email
body. Once SES receives the message with the placeholder, it will be replaced with
open tracking pixel image.
Important
Just add one {{ses:openTracker}}
placeholder, as more than one will
result in a 400 BadRequestException
error code being returned.
To capture link click events, Amazon SES replaces the links in your emails with links to a server operated by SES. This immediately redirects the recipient to his or her intended destination.
You also have the option to use your own domains, rather than domains owned and operated by Amazon SES, to create a more cohesive experience for your recipients, meaning all SES indicators are removed. You can configure multiple custom domains to handle open and click tracking events. These custom domains are associated with configuration sets. When you send an email using a configuration set, if that configuration set is configured to use a custom domain, then the open and click links in that email automatically use the custom domain specified in that configuration set.
This section contains procedures for setting up a subdomain on a server you own to automatically redirect users to the open and click tracking servers operated by Amazon SES. There are three steps involved in setting up these domains. First, you configure the subdomain itself, then set a configuration set to use the custom domain, and then set its event destination to publish open and click events. This topic contains procedures for completing all of these steps.
However, if you simply want to enable open or click tracking without setting up a custom domain, you can proceed directly to defining event destinations for your configuration set which enables event publishing that is triggered on the event types you specify, including open and click events. A configuration set can have multiple event destinations with multiple event types defined. See Creating Amazon SES event destinations.
Part 1: Setting up a domain for handling open and click link redirects
The specific procedures for setting up a redirect domain vary depending on your web hosting provider (and your Content Delivery Network, if you use an HTTPS server). The procedures in the following sections provide general guidance rather than specific steps.
Option 1: Configuring an HTTP domain
If you plan to use an HTTP domain to handle open and click links (as opposed to an HTTPS domain), the process for configuring the subdomain involves only a few steps.
Note
If you set up a custom domain that uses the HTTP protocol, and you send an email that contains links that use the HTTPS protocol, your customers may see a warning message when they click the links in your email. If you plan to send emails that contain links that use the HTTPS protocol, you should use an HTTPS domain for handling click tracking events.
To set up an HTTP subdomain for handling open and click links
-
If you have not already done so, create a subdomain to use for open and click tracking links. We recommend that you create a subdomain that is specifically dedicated to handling these links.
-
Verify the subdomain for use with Amazon SES. For more information, see Creating a domain identity.
-
Modify the DNS record for the subdomain. In the DNS record, add a new CNAME record that redirects requests to the Amazon SES tracking domain. The address that you redirect to depends on the AWS Region that you use Amazon SES in. The following table contains a list of tracking domains for the AWS Regions where Amazon SES is available.
AWS Region AWS tracking domain US East (Ohio) r.us-east-2.awstrack.me
US East (N. Virginia) r.us-east-1.awstrack.me
US West (N. California) r.us-west-1.awstrack.me
US West (Oregon) r.us-west-2.awstrack.me
Africa (Cape Town) r.af-south-1.awstrack.me
Asia Pacific (Jakarta) r.ap-southeast-3.awstrack.me
Asia Pacific (Mumbai) r.ap-south-1.awstrack.me
Asia Pacific (Osaka) r.ap-northeast-3.awstrack.me
Asia Pacific (Seoul) r.ap-northeast-2.awstrack.me
Asia Pacific (Singapore) r.ap-southeast-1.awstrack.me
Asia Pacific (Sydney) r.ap-southeast-2.awstrack.me
Asia Pacific (Tokyo) r.ap-northeast-1.awstrack.me
Canada (Central) r.ca-central-1.awstrack.me
Europe (Frankfurt) r.eu-central-1.awstrack.me
Europe (Ireland) r.eu-west-1.awstrack.me
Europe (London) r.eu-west-2.awstrack.me
Europe (Milan) r.eu-south-1.awstrack.me
Europe (Stockholm) r.eu-north-1.awstrack.me
Israel (Tel Aviv) r.il-central-1.awstrack.me
Middle East (Bahrain) r.me-south-1.awstrack.me
South America (São Paulo) r.sa-east-1.awstrack.me
AWS GovCloud (US) r.us-gov-west-1.awstrack.me
Note
Depending on your web hosting provider, it may take several minutes for the changes you make to the subdomain's DNS record to take effect. Your web hosting provider or IT organization can provide additional information about these delays.
Option 2: Configuring an HTTPS domain
You can only use an HTTPS domain for tracking link clicks. To set up an HTTPS domain for tracking link clicks, you have to perform some additional steps, beyond those required for setting up an HTTP domain.
Note
You can only use an HTTPS domain for tracking link clicks. Amazon SES only supports open tracking over HTTP domains when using a custom domain; otherwise, SES supports open tracking over HTTPS when a custom domain is not defined which will implicitly use domains owned and operated by SES.
To set up an HTTPS subdomain for handling click links
-
Create a subdomain to use for click tracking links. We recommend that you create a subdomain that is specifically dedicated to handling these links.
-
Verify the subdomain for use with Amazon SES. For more information, see Creating a domain identity.
-
Create a new account with a Content Delivery Network (CDN), such as Amazon CloudFront
. -
Configure the CDN to the origin which is the SES tracking domain, such as
r.us-east-1.awstrack.me
for example. The CDN must pass theHost
header supplied by the requester to the origin. Refer to this AWS re:Post articlefor more information. The address that you using depends on the AWS Region that you use in SES. The following table contains a list of tracking domains for the AWS Regions where SES is available. AWS Region AWS tracking domain US East (Ohio) r.us-east-2.awstrack.me
US East (N. Virginia) r.us-east-1.awstrack.me
US West (N. California) r.us-west-1.awstrack.me
US West (Oregon) r.us-west-2.awstrack.me
Africa (Cape Town) r.af-south-1.awstrack.me
Asia Pacific (Jakarta) r.ap-southeast-3.awstrack.me
Asia Pacific (Mumbai) r.ap-south-1.awstrack.me
Asia Pacific (Osaka) r.ap-northeast-3.awstrack.me
Asia Pacific (Seoul) r.ap-northeast-2.awstrack.me
Asia Pacific (Singapore) r.ap-southeast-1.awstrack.me
Asia Pacific (Sydney) r.ap-southeast-2.awstrack.me
Asia Pacific (Tokyo) r.ap-northeast-1.awstrack.me
Canada (Central) r.ca-central-1.awstrack.me
Europe (Frankfurt) r.eu-central-1.awstrack.me
Europe (Ireland) r.eu-west-1.awstrack.me
Europe (London) r.eu-west-2.awstrack.me
Europe (Milan) r.eu-south-1.awstrack.me
Europe (Stockholm) r.eu-north-1.awstrack.me
Israel (Tel Aviv) r.il-central-1.awstrack.me
Middle East (Bahrain) r.me-south-1.awstrack.me
South America (São Paulo) r.sa-east-1.awstrack.me
AWS GovCloud (US) r.us-gov-west-1.awstrack.me
-
If you use Route 53 to manage the DNS configuration for your domain and CloudFront as your CDN, create an Alias record in Route 53 that refers to your CloudFront distribution (such as d111111abcdef8.cloudfront.net). For more information, see Creating Records by Using the Amazon Route 53 Console in the Amazon Route 53 Developer Guide.
Otherwise, in the DNS configuration for your subdomain, add a CNAME record that refers to the address of your CDN.
-
Acquire an SSL certificate from a trusted Certificate Authority. The certificate should cover both the subdomain you created in step 1 as well as the CDN you configured in steps 3–5. Upload the certificate to the CDN.
Part 2: Setting up a configuration set to refer to a custom open and click tracking domain
After you configure your domain to handle open and click tracking redirects, you must
specify your custom domain in the configuration set.
You can complete this using the Amazon SES console or the
CreateConfigurationSetTrackingOptions
API operation.
This section references the procedures for completing these tasks using the Amazon SES console. For information about using the API, see CreateConfigurationSetTrackingOptions in the Amazon Simple Email Service API Reference.
-
To specify a custom redirect domain using the console...
-
while creating a new configuration set – see Tracking options in Step 4 of Create configuration sets
-
while modifying an existing configuration set – select the Edit button in the General details panel of the selected configuration set, and follow the directions for Tracking options in Step 4 of Create configuration sets
-
Part 3: Selecting open and click event types in your configuration set's event destinations
After specifying your custom domain in the configuration set, you must select open
and/or click event types in an event destination added to your configuration set. You
can complete this using the Amazon SES console or the CreateConfigurationSetEventDestination
API
operation.
-
To select open and/or click event types using the console...
-
while creating a new event destination – see Open and click tracking in Step 6 of Creating an event destination.
-
while modifying an existing event destination – select the Edit button in the Event types panel of the selected event destination in Step 6 of Editing, disabling/enabling, or deleting an event destination
-