# Cloudflare

## **Getting Started** <a href="#id-44i2qmvpb6e8" id="id-44i2qmvpb6e8"></a>

Before we begin, let’s make sure you have everything you need to setup your custom domain.

* A Cloudflare Domain
* A BotPanel bot with any tier of [BotPanel Pro](https://dashboard.botpanel.gg/pro)

## **Configuring DNS on BotPanel** <a href="#kw7mvw57oqf3" id="kw7mvw57oqf3"></a>

{% stepper %}
{% step %}
Login into the [BotPanel Dashboard](https://dashboard.botpanel.gg/panel/dns) and select the bot to which you would like to add the domain.
{% endstep %}

{% step %}
Visit the DNS tab on the side menu and click the Add Domain button.

<figure><img src="https://2161910846-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmDHZxxLwMjnoq0qGSjFm%2Fuploads%2FpYxGBH5TRmgRY84G5sO5%2F0.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
You will be prompted with an option to buy the domain via our partner NameCheap, or if you have already purchased a domain on NameCheap. Select one of the options and continue. If you need to buy a domain, please visit the [namecheap](https://docs.botpanel.gg/domain-setup-guides/guides/namecheap "mention") page instead.

![](https://2161910846-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmDHZxxLwMjnoq0qGSjFm%2Fuploads%2FyhyJubFY7pQMdccvEzGr%2F1.png?alt=media)
{% endstep %}

{% step %}
You will have to provide your domain or a subdomain you would like to add ( the one that you’ve purchased or linked to Cloudflare ) and click the Add Domain button.

Using the domain:

<figure><img src="https://2161910846-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmDHZxxLwMjnoq0qGSjFm%2Fuploads%2FHkOUKPWVHdqbbMmPhOht%2F2.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

Using a subdomain (example):<br>

<figure><img src="https://2161910846-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmDHZxxLwMjnoq0qGSjFm%2Fuploads%2FHyOU4ajsSah4xz4940n7%2F3.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

Upon adding your domain:

![](https://2161910846-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmDHZxxLwMjnoq0qGSjFm%2Fuploads%2FvaefOgv938h0AAKYutFk%2F4.png?alt=media)

Using a subdomain:

<figure><img src="https://2161910846-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmDHZxxLwMjnoq0qGSjFm%2Fuploads%2FJc2Y27asBCDdOhksuHXw%2F5.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Now click the Manage button to view the DNS records you will later need to add to Cloudflare in order to verify your domain and link it to the BotPanel. You should see something like this:

![](https://2161910846-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmDHZxxLwMjnoq0qGSjFm%2Fuploads%2FZ3PwDC6LZ17nR04vJRjy%2F6.png?alt=media)

Using a subdomain:

<figure><img src="https://2161910846-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmDHZxxLwMjnoq0qGSjFm%2Fuploads%2F06u1OGHRBZ15VRJyaWX8%2F7.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

You will need the information provided to you similar to the ones on the screenshot later in the NameCheap DNS configuration guide below.

## **Configuring DNS on Cloudflare** <a href="#id-4a2k48ftgv4f" id="id-4a2k48ftgv4f"></a>

{% stepper %}
{% step %}
Login into your CloudFlare account and select the domain you have setup DNS for on the BotPanel in the previous guide. You can do this by going to the Account Home tab and select the domain.

<figure><img src="https://2161910846-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmDHZxxLwMjnoq0qGSjFm%2Fuploads%2FwBylVbmWysN7WCOLn2oF%2Fimage.png?alt=media&#x26;token=add7cc14-7d21-42c2-acfe-013632595f55" alt="" width="563"><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Visit the Overview tab in your domain management page and select the DNS Records in the DNS options on the right.

<figure><img src="https://2161910846-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmDHZxxLwMjnoq0qGSjFm%2Fuploads%2FaPCJc47iqSS4VGMA2B2e%2Fimage.png?alt=media&#x26;token=a3bd8181-f364-4418-8bae-a25f2dba38a8" alt="" width="563"><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Add the records provided to you on the BotPanel under the DNS tab in your domain settings to the NameCheap ( Step 2 ).

The records provided to you on the BotPanel should look something like this

![](https://2161910846-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmDHZxxLwMjnoq0qGSjFm%2Fuploads%2FiLcGyfOyL08TxH01Tb7O%2F10.png?alt=media)

Using a subdomain:

<figure><img src="https://2161910846-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmDHZxxLwMjnoq0qGSjFm%2Fuploads%2FD7YIaug4oLu4M4qi9gH4%2F11.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Add the **CNAME** record using the Add Record button and add the Name/Host and the Value/Points provided to you on the BotPanel for the CNAME record.

<figure><img src="https://2161910846-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmDHZxxLwMjnoq0qGSjFm%2Fuploads%2FE2QQkO3RFvleMDeJkgvk%2Fimage.png?alt=media&#x26;token=5d71edef-7cb2-471e-a3d4-bc0498abd35a" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://2161910846-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmDHZxxLwMjnoq0qGSjFm%2Fuploads%2FlkAuDkWvmlI70H8pg8Ve%2Fimage.png?alt=media&#x26;token=d5e91425-f7ec-477a-b638-3456478e7340" alt="" width="563"><figcaption></figcaption></figure>

Using a subdomain:

<figure><img src="https://2161910846-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmDHZxxLwMjnoq0qGSjFm%2Fuploads%2Frb7uQQvgAWljWR3HMOhp%2Fimage.png?alt=media&#x26;token=a3e95f61-750c-42c5-8803-4d3d791ca870" alt="" width="563"><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Now let's add the **TXT** record using the Add Record button again and add the Name/Host and the Value/Points provided to you on the BotPanel for the TXT record.

<figure><img src="https://2161910846-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmDHZxxLwMjnoq0qGSjFm%2Fuploads%2FFHCKnw0bYHqUbrQAYouC%2Fimage.png?alt=media&#x26;token=08435802-c627-4269-ae26-374555c5ba91" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="warning" %}
Please give the newly created records some time to take effect in some rare cases it could take up to 24 hours.
{% endhint %}
{% endstep %}

{% step %}
Go back to the BotPanel DNS tab after a while and check if you linked your domain successfully, if you did you should see something like this:

<figure><img src="https://2161910846-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmDHZxxLwMjnoq0qGSjFm%2Fuploads%2FuGJ8tZ4e77uTrHlj1KCO%2Fimage.png?alt=media&#x26;token=0a9f70a5-2d2d-4bfa-bf37-0a66c80d78f1" alt="" width="563"><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

Congrats! You've successfully setup your domain to work with BotPanel.

{% hint style="info" %}
If you have any questions, please check out our [FAQ](https://docs.botpanel.gg/domain-setup-guides/faq) and [Guidelines & Contact](https://docs.botpanel.gg/guidelines-and-contact) for more information.
{% endhint %}


---

# 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.botpanel.gg/domain-setup-guides/guides/cloudflare.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.
