# Linking a domain to your server

To begin, you will need to get your numerical server ID (not to be confused with it's UUID). Your numerical server ID is a number. The easiest way to get this at the moment is on your server's manage server page where you can find the ID in the URL.

<figure><img src="/files/g3ESlprqDcHSLm8HJ4KD" alt=""><figcaption><p>Get your server ID in the url.</p></figcaption></figure>

Ok great, now 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 at `8787.site.bot-hosting.cloud`.

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

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

## Getting a TLS certificate

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

We recommend you use Cloudflare for getting a TLS certificate, it's free and works great. Firstly if you have not already, you need to move your domain's name servers to Cloudflare by signing up at <https://dash.cloudflare.com> and setting it up.

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

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

But this alone won't work. Since you are now passing the connection through a proxy, we can't figure out what target you're connecting to, so you need to add a `TXT` record as well. This TXT record should contain `bh-server=<your server ID>`.

<figure><img src="/files/Iwi7aOsYUaMpcpihrCJt" alt=""><figcaption><p>A TXT record for which server to target.</p></figcaption></figure>

Make sure you have SSL/TLS Encryption Mode set to flexible. Now you should be able to visit your domain through an HTTPS connection in your browser.

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


---

# 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://wiki.bot-hosting.net/guides/linking-a-domain-to-your-server.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.
