# Setup Custom Domain

### Requirements

* A domain or subdomain
* A Cloudflare Account

### Set your domain in Lancepilot

First you need to go to <https://lancepilot.com/dashboard> > settings > setup custom domain. From there you need to add your custom domain and click “Update Custom Domain Settings”

<figure><img src="/files/TUK6JC0CAML2vwdt4L8d" alt=""><figcaption></figcaption></figure>

### Sign in to your Cloudflare Account

Visit [Cloudflare](https://www.cloudflare.com/) and sign in to your account. If you don’t have a account in Cloudflare you need to sign up view the Sign up in Cloudflare docs.

### Sign Up to a new Cloudflare Account

Visit [Cloudflare](https://www.cloudflare.com/) then create a new account in Cloudflare. After you have created a new account you will see a page like the screenshot below, Then you need to add a site for your domain. Click on “Add Site” for adding a site.

<figure><img src="/files/uFzsZkCCV8D4dR5zgmG7" alt=""><figcaption></figcaption></figure>

Type your domain and click on “Continue”

<figure><img src="/files/TjBgYIHVDrYdEtAPB9bC" alt=""><figcaption></figcaption></figure>

Select the “Free” plan and click “Confirm Plan”

<figure><img src="/files/cqVKVbEwFdtUhKF7b5Fr" alt=""><figcaption></figcaption></figure>

Click on “Start quick scan”

<figure><img src="/files/ovwIM1VJr95jaOuA22uD" alt=""><figcaption></figcaption></figure>

Click on “Continue”

<figure><img src="/files/LkGsNuhxd7s3htgoj2RP" alt=""><figcaption></figcaption></figure>

On this step you need to change the “nameservers” of your domain to the Cloudflare nameservers shown when you are creating the site. To change the nameservers visit your domain provider platform and from there change the nameservers of your domain to the nameservers shown to you in Cloudflare when creating the site. Below is an example.

{% hint style="info" %}
Changing nameservers might take 24 - 48 hours to propagate.
{% endhint %}

<figure><img src="/files/SS8kREOtiaKFsXaUQR48" alt=""><figcaption></figcaption></figure>

Click on “Continue to “YOUR DOMAIN” overview”

<figure><img src="/files/Vxi1Wt3il9ljTd1LiOQg" alt=""><figcaption></figcaption></figure>

### Configure custom domain from Cloudflare

Go to the "overview" page of your Cloudflare site that you added. Now once you are on the “overview” page of your site in Cloudflare you can see a option called “DNS” on the left sidebar click on that option and then it will open up a new page for you to manage your domain’s DNS records. From there you need to add a “CNAME” record with the name “@” and the target should be **cname.lancepilot.com**. If you are using a subdomain use the subdomain name instead of the "@"

{% hint style="info" %}
For root domain add the CNAME record with name "@" and for subdomain add the CNAME record with name of the subdomain so if the domain is "whatsapp.domain.com" the name would be "whatsapp"
{% endhint %}

<figure><img src="/files/pnUoGiLV8dXKBhYMzqfr" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/k6h9Z9M1Zhos14hVcxzc" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/N0EKEljJfCauvQXBSeQ5" alt=""><figcaption></figcaption></figure>

### Set the SSL mode in Cloudflare

On this step you need to go to the “SSL” section from the left sidebar and from there select the “full” mode for SSL.

## Congratulations! 🎉 You have completed setting up your custom domain.


---

# Agent Instructions: 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:

```
GET https://docs.lancepilot.com/custom-domain/setup-custom-domain.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
