> Site index: https://usehardal.com/llms.txt
> Every content route also serves markdown at <url>.md

# How to Set Up First-Party Domain for Meta CAPI

Learn how to configure your Meta Pixel to work with your first-party domain using Hardal for better data accuracy and improved tracking.

Source: https://usehardal.com/how-to-set-up-first-party-domain-for-meta-capi
Published: 2025-12-17
Updated: 2025-12-17
Author: Emircan Uye

---

Setting up your Meta Pixel with a first-party domain improves data collection and helps bypass tracking restrictions. This guide shows you how to configure it through Hardal.

Before starting, ensure you have:
- Active Hardal account with a configured signal
- Meta Conversion API Gateway connection set up in Hardal
- Access to your DNS settings

Navigate to your Hardal dashboard and select your signal. Go to **Server Side Hosts** and verify your Meta Conversion API Gateway connection is configured.

![Screenshot: Hardal dashboard showing Server Side Hosts section with Meta CAPI Gateway configured](https://imge.usehardal.com/cdn/website/blog-post/how-to-set-up-first-party-domain-for-meta-capi/d0km8qbqpytfrkcoclap.jpg)

Then go to **Settings** > **Setup**. Scroll down to find the specific DNS record details.

![Screenshot: DNS record configuration section showing CNAME and TXT records](https://imge.usehardal.com/cdn/website/blog-post/how-to-set-up-first-party-domain-for-meta-capi/myquxcpufagngq3aj4mj.jpg)

Share these DNS record details with your IT team to set up:
- CNAME record pointing to Hardal's infrastructure
- TXT record for verification

Once your IT team confirms the DNS records are set up, navigate to your Signal Gateway dashboard and select your Meta CAPI connection.

Go to **Account Settings** > **Data Routing** and click **Optimize**.

![Screenshot: Meta Signal Gateway Data Routing settings](https://imge.usehardal.com/cdn/website/blog-post/how-to-set-up-first-party-domain-for-meta-capi/qcg50jyvlrgjxqwyujcz.jpg)

Enter your new CAPI domain (e.g., `capi.yourwebsite.com`) and click **Continue**.

If the DNS records are correctly configured, you'll see a success message.

After a few minutes, check your website to confirm that Meta Pixel and CAPI are working under your first-party domain.

You can verify this by:
1. Opening your browser's developer tools
2. Going to the Network tab
3. Looking for requests to your custom domain (e.g., `capi.yourwebsite.com`)

Your Meta Pixel is now operating through your first-party domain, providing better data accuracy and improved tracking reliability.

For a more detailed walkthrough, check out our step-by-step guide. [How To Set Up First Party Domain For Meta CAPI](https://youtu.be/m9rJP6EFxIk)
