> For the complete documentation index, see [llms.txt](https://docs.edgetag.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.edgetag.io/hosting/self-hosting/custom-domains.md).

# Custom domains

If your domain's DNS records are not hosted on Cloudflare or you are an OEM partner hosting multiple customers (domains), you will need to add support for Custom domains.&#x20;

{% hint style="warning" %}
You will still need to add one domain that will be an anchor for custom domains. You can purchase it directly from Cloudflare or transfer an existing one.
{% endhint %}

### Video guide

{% embed url="<https://www.loom.com/edit/dcd5b3a300bd43f9bf7a49c6827a096a>" %}

### Custom Hostname

First, we will need to enable Custom Hostnames. Click on "Account home" and select the domain that you will use for EdgeTag. In the left menu select "SSL/TLS" -> "Custom Hostnames". You will need to enable it (100 domains is free).

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

After it is enabled, you need to add a Fallback Origin. Normally, you would set it up as fallback.mysite.com or customers.mysite.com (mysite.com is your domain in Cloudflare).

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

To connect to the newly created Fallback Origin, click on DNS in the left menu and add the following record:

Type: `AAAA`\
Name: `customers` (or the name that you used in the Fallback Origin)\
Content: `100::`

<figure><img src="/files/5MrYVgUvqzlKUd0YZPtL" alt=""><figcaption></figcaption></figure>

### API Token

The last step in Cloudflare is to update API Token permissions. Go to "Manage Account" -> "Account API tokens" and click on edit of your EdgeTag token.

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

We will need to add two more permissions:

* Zone -> Zone (read)
* Zone -> SSL and Certificates (edit)

<figure><img src="/files/7CNas6oM3iXhp7EYfTMj" alt=""><figcaption></figcaption></figure>

### Host configuration

Now, we will need to return to EdgeTag and check the Custom Hostname option for the Host.

<figure><img src="/files/pggwhc0ho9ALxLGPy89b" 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://docs.edgetag.io/hosting/self-hosting/custom-domains.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.
