Skip to content

managed proxy #616

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Jul 3, 2025
2 changes: 1 addition & 1 deletion docs/custom-domain.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ title: Serve the script from your domain as a first-party connection
import useBaseUrl from '@docusaurus/useBaseUrl';

:::note
Custom domains are deprecated. We now recommend the proxy instead of the custom domain. [Here are the proxy instructions](/proxy/introduction.md)
We now recommend the proxy instead of the custom domain. [Here are the proxy instructions](/proxy/introduction.md)
:::
6 changes: 4 additions & 2 deletions docs/proxy/guides/akamai.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ title: Proxying Plausible through Akamai

import useBaseUrl from '@docusaurus/useBaseUrl';

Proxying Plausible through your own property on Akamai is easy, fast and privacy-friendly.
Here's how to proxy Plausible through your own property on Akamai. The instructions assume you use the default paths ``/js/script.js`` and ``/api/event``. You can change these based on your preferences.

The instructions assume you use the default paths ``/js/script.js`` and ``/api/event``. You can change these based on your preferences.
:::tip Don't want to manage your own proxy? We can handle it for you
Our managed proxy lets you send analytics through your own domain name as a first-party connection. All you need to do is set up a CNAME record using the instructions we'll send you and update the snippet on your site. We'll take care of everything else. [Contact us for details](https://plausible.io/contact).
:::

## Step 1: Proxy Analytics Script

Expand Down
7 changes: 5 additions & 2 deletions docs/proxy/guides/apache.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
title: Proxying Plausible through Apache HTTP Server
---

If you're already running Apache HTTP Server as your main web server or reverse
proxy, you can also configure it to proxy your analytics. Start by adjusting your configuration as shown in the next step.
If you're already running Apache HTTP Server as your main web server or reverse proxy, you can also configure it to proxy your analytics. Start by adjusting your configuration as shown in the next step.

:::tip Don't want to manage your own proxy? We can handle it for you
Our managed proxy lets you send analytics through your own domain name as a first-party connection. All you need to do is set up a CNAME record using the instructions we'll send you and update the snippet on your site. We'll take care of everything else. [Contact us for details](https://plausible.io/contact).
:::

## Step 1: Enable the required modules

Expand Down
8 changes: 5 additions & 3 deletions docs/proxy/guides/caddy.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
title: Proxying Plausible through Caddy
---

If you're already running Caddy as your main web server or reverse
proxy, you can also configure it to proxy your analytics. Start by adjusting your
configuration as shown in the next step.
If you're already running Caddy as your main web server or reverse proxy, you can also configure it to proxy your analytics. Start by adjusting your configuration as shown in the next step.

:::tip Don't want to manage your own proxy? We can handle it for you
Our managed proxy lets you send analytics through your own domain name as a first-party connection. All you need to do is set up a CNAME record using the instructions we'll send you and update the snippet on your site. We'll take care of everything else. [Contact us for details](https://plausible.io/contact).
:::

## Step 1: Update your Caddyfile

Expand Down
6 changes: 4 additions & 2 deletions docs/proxy/guides/cloudflare.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ title: Proxying Plausible through Cloudflare
import useBaseUrl from '@docusaurus/useBaseUrl';

You can use Cloudflare Workers to proxy your Plausible Analytics requests. Cloudflare Workers offers free service for up to 100,000 requests per day.
All you need to set it up is a free Cloudflare account.
All you need to set it up is a free Cloudflare account. Here's the step-by-step process for creating a proxy.

Here's the step-by-step process for creating a proxy. It takes only a few minutes and requires no tech know-how or prior experience.
:::tip Don't want to manage your own proxy? We can handle it for you
Our managed proxy lets you send analytics through your own domain name as a first-party connection. All you need to do is set up a CNAME record using the instructions we'll send you and update the snippet on your site. We'll take care of everything else. [Contact us for details](https://plausible.io/contact).
:::

Step 0: Sign up for a free Cloudflare account if you don't have an account already and add your site.

Expand Down
4 changes: 4 additions & 0 deletions docs/proxy/guides/cloudfront.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ import useBaseUrl from '@docusaurus/useBaseUrl';

You can use CloudFront to proxy your Plausible Analytics requests. Here's the step-by-step process for creating a proxy.

:::tip Don't want to manage your own proxy? We can handle it for you
Our managed proxy lets you send analytics through your own domain name as a first-party connection. All you need to do is set up a CNAME record using the instructions we'll send you and update the snippet on your site. We'll take care of everything else. [Contact us for details](https://plausible.io/contact).
:::

Step 0: Sign up for a free AWS account if you don't have an account already and create a CloudFront distribution.

## Step 1: Create new origin
Expand Down
4 changes: 4 additions & 0 deletions docs/proxy/guides/deno.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
title: Proxying Plausible through Deno Deploy
---

:::tip Don't want to manage your own proxy? We can handle it for you
Our managed proxy lets you send analytics through your own domain name as a first-party connection. All you need to do is set up a CNAME record using the instructions we'll send you and update the snippet on your site. We'll take care of everything else. [Contact us for details](https://plausible.io/contact).
:::

## Step 1: Deploy proxy code

Start by getting a [Deno Deploy](https://deno.com/deploy) account if you don't have one already.
Expand Down
4 changes: 4 additions & 0 deletions docs/proxy/guides/fastly.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ import useBaseUrl from '@docusaurus/useBaseUrl';

You can use Fastly to proxy your Plausible Analytics requests. Here's the step-by-step process for creating a proxy.

:::tip Don't want to manage your own proxy? We can handle it for you
Our managed proxy lets you send analytics through your own domain name as a first-party connection. All you need to do is set up a CNAME record using the instructions we'll send you and update the snippet on your site. We'll take care of everything else. [Contact us for details](https://plausible.io/contact).
:::

## Step 1: Create the Backend for Plausible

First, set up a Plausible backend:
Expand Down
4 changes: 4 additions & 0 deletions docs/proxy/guides/fresh.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
title: Proxying Plausible through Fresh
---

:::tip Don't want to manage your own proxy? We can handle it for you
Our managed proxy lets you send analytics through your own domain name as a first-party connection. All you need to do is set up a CNAME record using the instructions we'll send you and update the snippet on your site. We'll take care of everything else. [Contact us for details](https://plausible.io/contact).
:::

## Step 1: Add the script proxy

Create a file `routes/js/script.js.ts` in your project.
Expand Down
4 changes: 4 additions & 0 deletions docs/proxy/guides/netlify.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
title: Proxying Plausible through Netlify
---

:::tip Don't want to manage your own proxy? We can handle it for you
Our managed proxy lets you send analytics through your own domain name as a first-party connection. All you need to do is set up a CNAME record using the instructions we'll send you and update the snippet on your site. We'll take care of everything else. [Contact us for details](https://plausible.io/contact).
:::

## Step 1: Add URL rewrite rules

If you don't already have a `_redirects` file at the publishing directory of your site, create one. You can learn more about Netlify redirects and rewrites [here](https://docs.netlify.com/routing/redirects/). Here's the setup for proxying Plausible Analytics:
Expand Down
4 changes: 4 additions & 0 deletions docs/proxy/guides/nextjs.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ title: Proxying Plausible through Vercel with Next.js

There are two ways you can proxy Plausible through Next.js / Vercel. One is using the next-plausible npm package and the other is using the raw Next.js config. Here are the instructions:

:::tip Don't want to manage your own proxy? We can handle it for you
Our managed proxy lets you send analytics through your own domain name as a first-party connection. All you need to do is set up a CNAME record using the instructions we'll send you and update the snippet on your site. We'll take care of everything else. [Contact us for details](https://plausible.io/contact).
:::

## Using next-plausible

[next-plausible](https://github.com/4lejandrito/next-plausible) is an npm package that makes it easier to include Plausible Analytics in your Next.js site.
Expand Down
7 changes: 5 additions & 2 deletions docs/proxy/guides/nginx.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
title: Proxying Plausible through Nginx
---

If you're already running Nginx as your main web server or reverse
proxy, you can also configure it to proxy your analytics. Start by adjusting your configuration as shown in the next step.
If you're already running Nginx as your main web server or reverse proxy, you can also configure it to proxy your analytics. Start by adjusting your configuration as shown in the next step.

:::tip Don't want to manage your own proxy? We can handle it for you
Our managed proxy lets you send analytics through your own domain name as a first-party connection. All you need to do is set up a CNAME record using the instructions we'll send you and update the snippet on your site. We'll take care of everything else. [Contact us for details](https://plausible.io/contact).
:::

## Step 1: Update your Nginx config

Expand Down
4 changes: 4 additions & 0 deletions docs/proxy/guides/vercel.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
title: Proxying Plausible through Vercel
---

:::tip Don't want to manage your own proxy? We can handle it for you
Our managed proxy lets you send analytics through your own domain name as a first-party connection. All you need to do is set up a CNAME record using the instructions we'll send you and update the snippet on your site. We'll take care of everything else. [Contact us for details](https://plausible.io/contact).
:::

If you are hosting a **Next.js** application, see [Proxying Plausible through Next.js / Vercel](/proxy/guides/nextjs.md).

## Step 1: Add configuration file
Expand Down
33 changes: 20 additions & 13 deletions docs/proxy/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ This is the simplest way to install Plausible Analytics but it will also be bloc

### Are you concerned about missing data?

Proxy our script. This is the option for those who want to get more accurate stats. With our step-by-step instructions, the setup is straightforward even for those who don't have any coding experience.

A proxy basically maps certain URLs from your domain to the Plausible domain:
Proxy our script. This is the option for those who want to get more accurate stats. A proxy basically maps certain URLs from your domain to the Plausible domain:

```
https://<yourdomain.com>/js/script.js -> https://plausible.io/js/script.js
Expand All @@ -49,18 +47,33 @@ https://<yourdomain.com>/api/event -> https://plausible.io/api/event

When the browser requests a file at `https://yourdomain.com/js/script.js` it will actually be fetched from `https://plausible.io/js/script.js`. The analytics will work exactly the same but the script will be served without being flagged.

We used to have a CNAME/DNS custom domain approach in the past, but it's no longer effective, so we now recommend a proxy as it's a much more flexible and powerful solution.
## How to proxy requests to Plausible

You can proxy requests to Plausible in several ways depending on your setup. If you'd rather not handle it yourself, we also offer a managed proxy option.

### Managed proxy

Don't want to manage your own proxy? We can handle it for you. Our managed proxy lets you send analytics through your own domain name as a first-party connection. This helps bypass adblockers and count more traffic without any setup or maintenance on your end.

All you need to do is set up a CNAME record using the instructions we'll send you and update the snippet on your site. We'll take care of everything else.

Managed proxy is available on our Enterprise plans. [Contact us for details](https://plausible.io/contact).

### Standalone proxy

There are many ways you can proxy requests to Plausible depending on your hosting situation. We've divided our guides to *standalone* and *integrated* proxies. A standalone proxy can be set up on its own and it does not matter what hosting provider or tech stack you are using. Integrated proxy setups are dependent on how you've deployed your app.
A standalone proxy works with any tech stack or hosting provider. You're responsible for setting it up and keeping it running. You can use one of these options:

Standalone proxy setups:
* [Akamai](/docs/proxy/guides/akamai)
* [Cloudflare Workers](/docs/proxy/guides/cloudflare)
* [Fastly](/docs/proxy/guides/fastly)
* [CloudFront](/docs/proxy/guides/cloudfront)
* [Google Cloud Platform](https://github.com/mtlynch/plausible-proxy)
* [How to send events directly to our API](/docs/events-api)

### Integrated proxy

These setups depend on how your app is deployed. You'll need to handle the proxy setup and maintenance yourself. Here are the available options:

Integrated proxy setups:
* [WordPress](/docs/proxy/guides/wordpress)
* [Netlify](/docs/proxy/guides/netlify)
* [Vercel](/docs/proxy/guides/vercel)
Expand All @@ -70,9 +83,3 @@ Integrated proxy setups:
* [Apache](/docs/proxy/guides/apache)
* [Caddy](/docs/proxy/guides/caddy)
* [Django](https://github.com/imankulov/django-plausible-proxy)

Events API as a server side alternative:
* [How to send events directly to our API](/docs/events-api)

NPM package as another alternative:
* [NPM standalone package](https://github.com/plausible/plausible-tracker).