# How can i connect my domain to my Minecraft Server ?

#### How can i connect my domain to my Minecraft Server ?

How to connect your server to a domain:

Before we start you will need a domain. You can purchase a domain from registrars such as Hostinger, Namecheap, Godaddy Etc.

Visit your domain provider and locate the “Advanced DNS Zone”. It may be called “DNS Zone”, “DNS" (on cloudflare) or “Advanced DNS”, or anything similar.

&#x20;

The below guide is based off of cloudflare:

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

**If your server has a Dedicated IP (has the port 25565) you can stop here.**

&#x20;

**Create a SRV record of  the domain & continue  with the following :**

&#x20;

* Set the target as the sub-domain you used above, including the main domain (e.g. **`play.yourdomain.com)`**, or to the main domain if you don’t want to use a sub-domain (e.g. **`yourdomain.com`**)
* Set the name to the sub-domain you used, for example **`play`** or **`mc`**, or **`@`** if you don’t want to use a sub-domain.
* Set the name of the SRV to \_minecraft.\_tcp.play (Play should be replaced  by your sub-domain)
* Set the priority to 0
* Set the weight to 5
* TTL shall be set to Auto
* Port should be the port of your minecraft server
* Target field should be your subdomain with your domain (e.g.  play.yourdomain.com)

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

DNS changes can take up to 24 hours to update existing records, but new records usually show instantly.\
Similarly if you also run Geyser on your Minecraft server and want a separate record for it ?&#x20;

You can create a separate record for Pe players by creating a new 'A ' record such as pe.endercloud.in.&#x20;


---

# 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://know.endercloud.in/faq-minecraft/how-can-i-connect-my-domain-to-my-minecraft-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.
