Articles on: Game Server Management

How to Use a Domain to Connect to a Server

We will be showing you how to setup your own domain to connect to your game server using an SRV Record via Cloudflare.

An SRV Record is not as stable as an A record. We suggest using an A record with a dedicated IP.

Log in or create an account on Cloudflare.

On your Cloudflare account dashboard, click on the Add site button on the middle of the page or to the upper right of the page.


Enter your domain and click Add site.



You will then see options for different plans. You will want to choose the free plan.

After selecting your plan, Cloudflare will search your current records if any. On this page is where you can choose to keep or remove the current records. You can also choose to set up records here as well.

If you want to remove any current record, click the X next to each one you want to remove. If you would like to keep the record, go ahead and click the continue button at the bottom.
If you have no records at the moment, a little confirm box will show up. Click the confirm button as we will be adding records later.



On the next page, you will get the nameservers you need to change your domain to. This can be done from where your domain is hosted. Usually, this is in the DNS configuration. Though, some sites have a separate nameservers configuration option.



After a few minutes since changing your domain's nameservers to the one provided by Cloudflare, click Re-check on the overview page to confirm if the changes have taken effect.
Changes to your domain's nameservers can take time to update. Usually, this is only a few minutes, though can take up to 24-hours. We suggest waiting for 5 to 10 minutes before re-checking on Cloudflare.

Once your domain has been successfully setup with Cloudflare, locate and click on the DNS tab.



Now that you have successfully setup your domain with Cloudflare, you have two options to choose from:
OPTION 1: Use the domain as your server address. Example: yourdomain.net
OPTION 2: Use a subdomain as your server address. Example: play.yourdomain.net


We will be having it directly set to the domain. To do that with Cloudflare, you will want to set the name of the A record to the @ symbol. You will now want to set the IPv4 address to your servers numerical IP without the port.

To get the servers numerical IP, you will want to head to the home page of the control panel. You will see where it says Server Address.

Be sure you do not copy and paste in the port.

Go ahead and copy that. You will then want to paste it into the IPv4 address option on Cloudflare. You will also see an orange cloud, you will want to click it to make it grey.
Then click the add record button. Your page should look like a variant of the image below.


Now that you have your A record setup, you will want to proceed to create an SRV record.
You will see the drop down box, you will want to click it and find the SRV option.



Upon clicking on SRV, you will a popup that appears. The following options will be there:

Service
Protocol
Name

You will want to fill them in with the following.

Service _minecraft
Protocol TCP
Name yourdomain.net

If you decide to use a subdomain of your domain, like play.yourdomain.net. Then you would put play.yourdomain.net in the name option.

Your SRV configuration should look like a variant of the one below.

SRV Configuration

Once you hit the blue save button, another popup will appear.

Priority
Weight
Port
Target

You will want to fill this in with the following information.

Priority: 0
Weight: 5
Port: Your Server Port
Target: yourdomain.net

Again, if you decide to use a subdomain of your domain, like play.yourdomain.net. Then you would put play.yourdomain.net in the target option.

Your SRV Content configuration should look like a variant of the image below.

SRV Content Configuration

Upon clicking the save button, you will see that it has the information filled into the add record option. You will want to click the blue add record button as seen in the image below.




Now that you have successfully added an A record and an SRV record, you will be able to use said domain to connect to your Minecraft server!


Please note that these options can take time to update depending on your ISP. Usually, it is within minutes of making the changes. Though it can take up to 24-hours to propagate.

If you need any further help or explanation on this, please do not hesitate to ask us on our chat feature.

Updated on: 01/27/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!