1. After logging into CloudFront, click Distributions, then click Create distribution.
2. In the Origin domain field, enter the PartnerPage URL for your directory. To find it, open your directory in PartnerPage, go to Customizations > URLs, click Reverse proxy, and copy the address in the Locate your CDN configuration guide section. Leave off the "https://" at the start. The address looks like this: <directory ID>.directory.sites.partnerpage.io
3. In the origin settings, set Protocol to HTTPS only.
4. In the Cache key and origin request section, create a new cache policy. Under Origin request headers, click Add header and add these two headers:
Header Name: PartnerPage-Client-IP, Value: clientIP
Header Name: PartnerPage-Reverse-Proxy, Value: true (type the word true without quotes)
In the same cache policy, set Query strings to All, so CloudFront forwards the full path and query string of every request. Don't add the Host header to the policy: CloudFront then sends your PartnerPage address as the host, which PartnerPage needs. All other settings can stay as they are. Then click Create distribution at the bottom of the page.
5. Your new distribution appears in the list, as in the example below. CloudFront gives it a default domain name. Click the ID to see more details.
6. In the distribution's details, your domain is shown under Distribution domain name. This means the distribution is set up and ready to go. You'll see your own domain here instead of the default one in the example.
7. Next, enter your domain and path in PartnerPage. In your directory, go to Customizations > URLs and choose Reverse proxy in the Choose your setup method section. In the Set your custom URL section, enter the domain and path CloudFront serves, such as yourdomain.com/partners, leaving off the "https://". Then click Save.
8. Open yourdomain.com/partners in your browser to check that your directory loads. If you see "Invalid reverse proxy setup", check the headers in step 4 and the address in step 7. More help: Use your own domain for your directory.










