You can serve your PartnerPage-hosted directory under your own domain (e.g. yourdomain.com/partner-directory/) by using Cloudflare Workers. This keeps users on your domain while loading content from your PartnerPage instance.
✅ Requirements
Your domain is using Cloudflare DNS
You have Cloudflare Workers enabled (included in most paid plans)
You want to serve a directory under a path like /partner-directory/ or /integrations-directory/
Your know your PartnerPage base URL (e.g. https://<your-id>.directory.sites.partnerpage.io or <yourcompany>.partnerpage.io)
1: Add a Cloudflare Worker
Go to your Cloudflare dashboard
Select the domain you’d like to use
Navigate to Workers & Pages > Workers
Click “Create Worker”
This will open the Cloudflare Worker editor.
Step 2: Add the PartnerPage Proxy Script
Paste the following script into the Worker editor:
addEventListener("fetch", event => {
const requestURI = new URL(event.request.url);
if (
requestURI.hostname === "yourdomain.com" && // replace with your actual domain
(requestURI.pathname.startsWith("/partner-directory/") ||
requestURI.pathname.startsWith("/integrations-directory/"))
) {
event.respondWith(rewriteProxyURL(event.request));
}
});
async function rewriteProxyURL(request) {
const originalURI = new URL(request.url);
const newURI = new URL(request.url);
newURI.protocol = "https:";
newURI.hostname = "yourname.partnerpage.io"; // replace with your PartnerPage subdomain
newURI.pathname = originalURI.pathname;
const clientIP = request.headers.get("cf-connecting-ip");
const headers = new Headers(request.headers);
headers.set("PartnerPage-Client-IP", clientIP);
headers.set("PartnerPage-Reverse-Proxy", "true");
return fetch(newURI.toString(), {
method: request.method,
headers: headers,
body: request.body,
redirect: "follow"
});
}Configure the script for your setup:
Replace the following values:
Line 4: Replace
"yourdomain.com"with your actual domainLine 5-6: Update the path(s) to match your desired directory URL. You can:
Keep one path and remove the other if you only need one directory
Add additional paths using the same pattern
Customize the path names (e.g.,
/experts/,/partners/,/marketplace/)
Line 17: Replace
"yourname.partnerpage.io"with your PartnerPage subdomain (found in your PartnerPage admin or onboarding instructions)
Important: The full path (including /partner-directory/) will be forwarded to your PartnerPage instance. For example:
Request:
yourdomain.com/partner-directory/partner-123Proxied to:
yourname.partnerpage.io/partner-directory/partner-123
3: Assign a Route to the Worker
Once your script is saved:
Go to the “Triggers” tab in your Worker
Under the "Routes" section, click "Add route"
Enter your route pattern that matches the path you want to proxy:
yourdomain.com/partner-directory/*
Select your domain zone from the dropdown
Click "Save"
Note: If you're proxying multiple paths (e.g., both /partner-directory/ and /integrations-directory/), add a separate route for each:
yourdomain.com/partner-directory/*yourdomain.com/integrations-directory/*
This route tells Cloudflare to invoke your Worker whenever someone visits that path.
4. Review your configuration
To successfully proxy your PartnerPage directory using Cloudflare Workers, make sure you have:
✅ A Cloudflare Worker that:
Matches your desired path (e.g. /partner-directory/ or /integrations-directory/)
Forwards the complete path of the request to your PartnerPage subdomain
Sets the required headers below
✅ One or more route like yourdomain.com/partner-directory/* bound to the Worker in the Triggers tab
✅ The following required headers included in the request:
PartnerPage-Reverse-Proxy: true
PartnerPage-Client-IP: <visitor IP from cf-connecting-ip>
These headers are required for PartnerPage to accept and respond to proxy traffic properly. Without them, requests may be rejected or fail to load.
Once configured, your PartnerPage content will appear seamlessly under your domain with full functionality.
Troubleshooting
Troubleshooting
404 errors when visiting your proxied URL:
Verify your route pattern matches exactly (including the
/*wildcard)Check that your PartnerPage subdomain is correct
Ensure the path in your Worker script matches the route you configured
Content not loading or styling broken:
Confirm the required headers (
PartnerPage-Reverse-ProxyandPartnerPage-Client-IP) are set in the scriptCheck your browser's developer console for any blocked resources
Redirect loops:
Make sure your PartnerPage instance doesn't have conflicting redirect rules
Verify your Worker's hostname check matches your actual domain
Need help? Reach out to PartnerPage support anytime.
