Skip to main content

How to Set Up a Reverse Proxy to PartnerPage with Amazon CloudFront

Using CloudFront's CDN, you can customize your directory URL to seem as if it's part of your site, such as yourdomain.com/partners

Ali Winberry avatar
Written by Ali Winberry
Updated over a month ago
  1. After logging into CloudFront, click on 'Distributions.' Then click 'Create distribution.'

2. In the origin domain field, enter in your PartnerPage URL for your directory. It will either be in the format of <yourdomain>.partnerpage.io, or <UUID>.directory.sites.partnerpage.io, depending on which version of the directory you are on. Make the following changes for the origin configurationClick on HTTPS only. Then hit create distribution at the bottom.

In the Cache key and origin request section, create a new cache policy. Under Origin Request Headers select Add header and add the two following headers:

  1. Header Name: PartnerPage-Client-IP, Value: clientIP

  2. Header Name: PartnerPage-Reverse-Proxy, Value: 'true'

All other settings can remain as-is.

3. In the example below, your domain will be shown in the Domain name field. This example generated a default domain name to use. Click on the ID number to see additional details.

4. When you open the details of the distribution, you will see your domain under the Distribution domain name. This means that the distribution is done, and ready to go! Your domain will be displayed here instead of this default domain in the example.

5. Next, you need to enter your domain name in the URL settings in PartnerPage. See the example below. Click on customizations, and the URL's. Now enter your domain in the Agency directory custom domain name field and/or the integrations directory custom domain. Then add the portion you'd like to be used each directory, such as /directory or /partners.

6. Now your domain name is now masking the PartnerPage URLs!

Additional configuration examples

Origin settings

Pattern matching behavior settings - Precedence 0

Default behavior settings - Precedence 1

Did this answer your question?