# Client hint configuration header

**URL:** <https://forum.pirsch.io/t/client-hint-configuration-header/45>\
**Category:** Support\
**Created:** [February 8, 2024, 10:02am UTC](https://forum.pirsch.io/t/client-hint-configuration-header/45 "2024-02-08T10:02:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![KasperKamperman](https://forum.pirsch.io/user_avatar/forum.pirsch.io/kasperkamperman/32/29_2.png) [@KasperKamperman](https://forum.pirsch.io/u/KasperKamperman)\
**Post date:** [February 8, 2024, 10:02am UTC](https://forum.pirsch.io/t/client-hint-configuration-header/45/1 "2024-02-08T10:02:21Z")

</div>

I was reading the documentation on client hints.  
I’m serving my website with php, but cache as .html is there a way to add these headers? With Apache? Or is that not really needed?

> **[Pirsch Analytics Documentation](https://docs.pirsch.io/get-started/client-hints)**
>
> Pirsch is a simple, privacy-friendly, and open-source web analytics solution.

I’m using a subdomain (dash.zwemindex.nl), so how do I change the header in this context?

---

<div class="post-metadata">

**Author:** ![Marvin](https://forum.pirsch.io/user_avatar/forum.pirsch.io/marvin/32/16_2.png) [@Marvin](https://forum.pirsch.io/u/Marvin)\
**Post date:** [February 9, 2024, 12:15pm UTC](https://forum.pirsch.io/t/client-hint-configuration-header/45/2 "2024-02-09T12:15:51Z")

</div>

We’ll definitely need to improve the documentation on this topic. Right now, you should use the domain the traffic is sent to. So if you’re using a custom domain, replace [pirsch.io](http://pirsch.io) with that.

There is a ticket for it. More documentation, testing if this actually works as intended, and so on. We’ll announce it in the news 🙂

---

<div class="post-metadata">

**Author:** ![KasperKamperman](https://forum.pirsch.io/user_avatar/forum.pirsch.io/kasperkamperman/32/29_2.png) [@KasperKamperman](https://forum.pirsch.io/u/KasperKamperman)\
**Post date:** [February 9, 2024, 1:26pm UTC](https://forum.pirsch.io/t/client-hint-configuration-header/45/3 "2024-02-09T13:26:10Z")

</div>

Thanks  
I set the header like this but I get a permissions policy error:

> Header always set Permissions-Policy “ch-ua=(self ‘[https://dash.zwemindex.nl](https://dash.zwemindex.nl)’), ch-ua-mobile=(self ‘[https://dash.zwemindex.nl](https://dash.zwemindex.nl)’), ch-ua-platform=(self ‘[https://dash.zwemindex.nl](https://dash.zwemindex.nl)’), ch-ua-platform-version=(self ‘[https://dash.zwemindex.nl](https://dash.zwemindex.nl)’), ch-width=(self ‘[https://dash.zwemindex.nl](https://dash.zwemindex.nl)’), ch-viewport-width=(self ‘[https://dash.zwemindex.nl](https://dash.zwemindex.nl)’)”

Any clue?

---

<div class="post-metadata">

**Author:** ![Marvin](https://forum.pirsch.io/user_avatar/forum.pirsch.io/marvin/32/16_2.png) [@Marvin](https://forum.pirsch.io/u/Marvin)\
**Post date:** [February 10, 2024, 10:46am UTC](https://forum.pirsch.io/t/client-hint-configuration-header/45/4 "2024-02-10T10:46:46Z")

</div>

What error do you get? I think that should be correct, the single ticks might be the issue (‘ instead of ').

---

<div class="post-metadata">

**Author:** ![KasperKamperman](https://forum.pirsch.io/user_avatar/forum.pirsch.io/kasperkamperman/32/29_2.png) [@KasperKamperman](https://forum.pirsch.io/u/KasperKamperman)\
**Post date:** [February 10, 2024, 1:05pm UTC](https://forum.pirsch.io/t/client-hint-configuration-header/45/5 "2024-02-10T13:05:51Z")

</div>

I checked (I thought the ticks were added in the forum, but they came from copy-pasting from the documentation page). In visual studio code the ’ was shown, but to be sure I replaced them manually again. I still get the error.

```auto
Header always set Permissions-Policy "ch-ua=(self 'https://dash.zwemindex.nl'), ch-ua-mobile=(self 'https://dash.zwemindex.nl'), ch-ua-platform=(self 'https://dash.zwemindex.nl'), ch-ua-platform-version=(self 'https://dash.zwemindex.nl'), ch-width=(self 'https://dash.zwemindex.nl'), ch-viewport-width=(self 'https://dash.zwemindex.nl')"

```

Error message:

```auto
Error with Permissions-Policy header: Parse of permissions policy failed because of errors reported by structured header parser.

```

---

<div class="post-metadata">

**Author:** ![KasperKamperman](https://forum.pirsch.io/user_avatar/forum.pirsch.io/kasperkamperman/32/29_2.png) [@KasperKamperman](https://forum.pirsch.io/u/KasperKamperman)\
**Post date:** [February 10, 2024, 1:22pm UTC](https://forum.pirsch.io/t/client-hint-configuration-header/45/6 "2024-02-10T13:22:04Z")

</div>

Ok, solved it. The policy should have double quotation marks instead of single.

This is the line in .htaccess that works (escaped double quotes):

```auto
Header always set Permissions-Policy "ch-ua=(self \"https://dash.zwemindex.nl\"), ch-ua-mobile=(self \"https://dash.zwemindex.nl\"), ch-ua-platform=(self \"https://dash.zwemindex.nl\"), ch-ua-platform-version=(self \"https://dash.zwemindex.nl\"), ch-width=(self \"https://dash.zwemindex.nl\"), ch-viewport-width=(self \"https://dash.zwemindex.nl\")"

```

---

<div class="post-metadata">

**Author:** ![Marvin](https://forum.pirsch.io/user_avatar/forum.pirsch.io/marvin/32/16_2.png) [@Marvin](https://forum.pirsch.io/u/Marvin)\
**Post date:** [February 13, 2024, 10:33am UTC](https://forum.pirsch.io/t/client-hint-configuration-header/45/7 "2024-02-13T10:33:25Z")

</div>

Glad that you were able to solve it! 👍
