# Connecting a domain to a web server

## Connecting a domain to a web server (online map, website, etc.)

### To connect a domain to a web server, you need to:

1. Link your domain to CloudFlare, to do this:

* Go to <https://dash.cloudflare.com>
* Register and confirm your email
* Click Add Domain, enter your domain name, select a free plan and set up the specified DNS in your registrar
* Wait a few hours (on average up to 3) until the DNS updates. After that, a message about the activation of the domain in Cloudflare will be sent to your email

2. Go to the DNS tab in Cloudflare
3. Create a DNS record:

* Type: `CNAME` or `A`
* Name: domain, if you want to create a record on the root of the domain use `@`
* Target: your node address, for example `node.domain.com`
* Proxy: leave it on

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

4. Go to the tab Rules -> Origin Rules
5. Click `Create rule`:

* Enter any name
* Field: `Hostname`
* Operator: `Equals`
* Value: your domain name, for example `domain.com`
* Select `Rewrite to` and specify the port of your web server (online map, site)

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

6. Click <mark style="color:green;">Deploy</mark>\
   **🎉 Done! You have connected the domain to the web server.**


---

# 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://domainproxy.gitbook.io/domainproxy/readme.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.
