Serve the script from your domain as a first-party connection

We offer a quick and easy way to serve the Plausible Analytics script from your domain name as a first-party connection. Click on the "Add custom domain" button in the "Custom domain" section of your website settings to get started.

Serve the script from your domain as a first-party connection

Type in your chosen subdomain

We recommend using a subdomain of the website you're running Plausible Analytics on. If your site is on yourdomain.com you can use plausible.yourdomain.com. The name of the subdomain can be anything that you want. Type in your subdomain in the "Domain" field and click on the "DNS setup" button.

Type in your chosen subdomain

Create a new CNAME record for your chosen subdomain

Next, you need to go to your DNS provider’s website and create a new CNAME record for your chosen subdomain. Please check with your DNS provider's documentation on how you can create a new CNAME record.

Point the CNAME record to custom.plausible.io. (including the last dot) and then click on the "Done" button on the Plausible Analytics website.

Create a new CNAME record for your chosen subdomain

It may take up to 4 hours for the DNS changes to propagate

It may take up to 4 hours for the DNS changes to propagate and for us to obtain an SSL certificate for your subdomain. The setup is working when your subdomain loads our JavaScript file (yoursubdomain.yourdomain.com/js/plausible.js).

Replace the tracking code on your website with the new code

When our JavaScript file loads from your subdomain, you can finish your setup by replacing the tracking code on your site with something that looks like the following code (your custom code will be shown on the confirmation page):

<script async defer data-domain=”yourdomain.com” src=”https://yoursubdomain.yourdomain.com/js/index.js”></script>
Update the tracking code on your site

Remove the custom domain integration

If you'd like to remove the custom domain you have configured, click on the "Remove custom domain" button in the "Custom domain" section of your website settings.