> For the complete documentation index, see [llms.txt](https://docs.metrical.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.metrical.xyz/developers/custom-domain.md).

# Custom Domain

Sometimes Ad-blockers will block our `metrical.xyz` domain in order to try to give their users a better privacy and navigation. As we said it before, we don't store any personal information about visitors of your site,  but we offer a solution about this problem: you can setup a subdomain of your main domain to serve the metrical script and calls.&#x20;

With this solution, Ad-blockers won't block our script and calls and you will be able to use Metrical as normal.&#x20;

### How to add a custom domain to Metrical&#x20;

Open your domain provider (Godaddy, Namecheap, ect) and add a subdomain of your choice with a  `CNAME` record pointing to `cdn.metrical.xyz.` (add also the last dot `.`)

Something like this:

`CNAME`       **log.customdomain.com**       `cdn.metrical.xyz.`

Then, add the exact subdomain (without https\:// or http\://) to the settings page of an application on Metrical. This is necessary to obtain a SSL certificate with [Let’s Encrypt](https://letsencrypt.org/), so your data (and the visits of your users will be safe and protected by HTTPS.

### How to change the tracking script to use a custom domain&#x20;

Change cdn.metrical.xyz to your custom domain inside the tracking script, and also add the `host` property inside the `metrical` object.

Like this:

```javascript
<script>
  window.metrical = {
    "app": "Your website UUID",
    "host": "https://log.customdomain.com"
  }
</script>        
<script async
    src="https://log.customdomain.com/script.js"
    type="text/javascript">
</script>
```

After that, you are ready to go!


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.metrical.xyz/developers/custom-domain.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
