> For the complete documentation index, see [llms.txt](https://bothosting-net.gitbook.io/bot-hosting.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bothosting-net.gitbook.io/bot-hosting.net/legacy/link-domain.md).

# Link a Domain to your Server

To begin, you need your numerical server ID, not to be confused with its UUID. The easiest way to get it right now is from your server's Manage Server page, where you can find the ID in the URL.

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

Get your server ID from the URL.

Now that you have your server ID, you simply need to add a CNAME record pointing to `<your server ID>.site.bot-hosting.cloud`. For example, with my ID, 8787, I would point it to `8787.site.bot-hosting.cloud`.

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

Example setup in Cloudflare.

You can set the name to `@` to use your root domain without a subdomain.

### **Getting a TLS certificate** <a href="#t532mk63r66" id="t532mk63r66"></a>

{% hint style="info" %}
If you want to visit your site over HTTPS, you need a TLS certificate.
{% endhint %}

We recommend Cloudflare for getting a TLS certificate. It is free and works great. First, if you have not already done so, move your domain's nameservers to Cloudflare by signing up at [https://dash.cloudflare.com](https://dash.cloudflare.com/) and setting it up.

Then you need to set up a CNAME record, as above, but this time make sure the `Proxy status` option is checked.

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

DNS record with proxying enabled.

But this alone will not work. Since you are now passing the connection through a proxy, we cannot figure out what target you are connecting to, so you also need to add a `TXT` record. This TXT record should contain `bh-server=<your server ID>`.

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

A TXT record that specifies which server to target.

Make sure you have SSL/TLS Encryption Mode set to Flexible. You should then be able to visit your domain over HTTPS in your browser.

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


---

# 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://bothosting-net.gitbook.io/bot-hosting.net/legacy/link-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.
