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.
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.
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.
Some domain registrars such as GoDaddy don't accept CNAME values with a dot at the end while others require it. If your registrar doesn't accept your CNAME records, please delete the dot at the end and try again.
In most cases this process takes a few minutes but it may take up to 4 hours for the DNS changes to propagate and for us to obtain an SSL certificate for your subdomain.
You can check whether the CNAME record is set up correctly by entering your subdomain (
yoursubdomain.yourdomain.com) in an online CNAME lookup tool.
Don't worry if your subdomain (
yoursubdomain.yourdomain.com) shows a 404 error. That's expected behaviour. The important part is that the script itself loads from your subdomain (
yoursubdomain.yourdomain.com/js/index.js). That's when you can replace the snippet on your site.
Do you have a wildcard SSL configuration, so your subdomains automatically get the SSL certificate? Please disable it for the subdomain you want to serve Plausible script from. We will automatically get the SSL certificate from Let's Encrypt for your subdomain.
Using Cloudflare for DNS and having your sites proxied behind Cloudflare? A proxy in front of your custom domain can override the remote IP which would lead to wrong geolocation data in your stats. Are you seeing some SSL or other errors? Cloudflare proxy may be the culprit because it doesn't allow our server to provision an SSL certificate to you. In both of these cases, removing the proxy and making it just a DNS record in your Cloudflare settings solves the issue.
Using CSP? Do not forget to add this new subdomain specifically to your Content Security Policy too.
This is not necessary. You could use one custom domain for all your sites.
This is convenient if you're running several sites as subdomains. In that case you could create plausible.yourdomain.com as your custom domain and use that for all the different subdomains you have as part of yourdomain.com (subdomain1.yourdomain.com, subdomain2.yourdomain.com etc).
You can use the same custom domain on your other domains too. The only difference is that in those cases you'll be making a call to plausible.yourdomain.com from yourotherdomain.com rather than having it all under the same domain. The functionality remains the same and everything still works fine.
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.