Prerequisites
You will need a domain name (ex:yourserverdomain.net) to be pointing to cloudflare which is linked and active. You should see something similar to this but with your domain name on the left. If you don't see this, you did not change your domains name-servers correctly.

Navigate To DNS
On the top of the screen, select the DNS button.

Creating The DNS Records
Sadly, you can't have the domain to the server and the website as yourserverdomain.net. Doing so on Cloudflare will cause a round-robin effect rendering your domain name 50% useless. So instead, I've made some sections below on how to do it. If you plan Not to have a website connection while having your server. Simply skip the 2 sections below and read the server only options that apply's to your situation.

Website & Server
If your planning to host your website and server with your domain.

Follow the section below.
Website Only (yourserverdomain.net)
Then scroll to the section that applies to your server.
Server Only + Subdomain (No Dedicated IP) (anything.yourserverdomain.net)
Server Only + Subdomain (Dedicated IP) (anything.yourserverdomain.net)

Website Only (yourserverdomain.net)
On the DNS section, ensure you have it set as A on the left-hand side. On the 1st textbox. Type in the value @. Upon saving it will auto change to your domain name. On the 2nd text box, type in the ip sent to you in the website hosting email. Info about the email will be below.

Email Subject: "AH | New Website Assigned"
Server IP: *..**.*** IP displayed on Email, use on Highlighted Field on Image Below.

Then you're done. Try to visit your website yourserverdomain.net!

Server Only (No Dedicated IP) (yourserverdomain.net)
Example Variables
Server IP: 192.43.23.5:25843
Desired Domain: yourserverdomain.net

On the DNS section, ensure you have it set as A on the left-hand side. On the 1st text box. Type in the value @. Upon saving it will auto change to your domain name. On the 2nd text box, Type in the server ip you have excluding the port (192.43.23.5). Before selecting Add Record, ensure the cloud right next to it is orange. If it's grey, simply select it to change it to orange. When confirming everything is correct, select Add Record.

Once you complete that you need to setup the SRV record for it. Since you activated the Orange cloud the IP masking service is hiding your original IP from attackers. On the left list click the A drop down box and select SRV.

This interface will appear. The service details needed will be below. Please copy the details below onto Cloudflare.
Service name: _minecraft
Protocol: TCP
Name: @

Select Save to go to the next section.
Set it as the settings below.
Priority: 0
Weight: 0
Port: (Your Server Port) (This Example: 25843)
Target: Your Domain (Ex: yourserverdomain.net)

Once you hit save. Click Add Record. Once that's completed. Wait 1-2 minutes and join your server with the domain!

Then you're done. Try to join your server with your set server domain.

Server Only (Dedicated IP) (yourserverdomain.net)
Example Variables
Server IP: 192.43.23.5:25565
Desired Domain: yourserverdomain.net

On the DNS section, ensure you have it set as A on the left-hand side. On the 1st text box. Type in the value @. Upon saving it will auto change to your domain name. On the 2nd text box, Type in the server ip you have excluding the port (192.43.23.5). Before selecting Add Record, ensure the cloud right next to it is orange. If it's grey, simply select it to change it to orange. When confirming everything is correct, select Add Record.

Once you complete that you need to setup the SRV record for it. Since you activated the Orange cloud the IP masking service is hiding your original IP from attackers. On the left list click the A drop down box and select SRV.

This interface will appear. The service details needed will be below. Please copy the details below onto Cloudflare.
Service name: _minecraft
Protocol: TCP
Name: @

Select Save to go to the next section.
Set it as the settings below.
Priority: 0
Weight: 0
Port: (Your Server Port) (This Example: 25565)
Target: Your Domain (Ex: yourserverdomain.net)

Once you hit save. Click Add Record. Once that's completed. Wait 1-2 minutes and join your server with the domain!

Then you're done. Try to join your server with your set server domain.

Server Only + Subdomain (No Dedicated IP) (anything.yourserverdomain.net)
Example Variables
Server IP: 192.43.23.5:25843
Desired Domain: anything.yourserverdomain.net

On the DNS section, ensure you have it set as A on the left-hand side. On the 1st text box. Type in the value that you want your players to join with. For example, if you want a player to join with play.yourserverdomain.net, type in play. If you want a player to join the server with mc.yourserverdomain.net. Type in mc. On the 2nd text box, Type in the server ip you have excluding the port (192.43.23.5). Before selecting Add Record, ensure the cloud right next to it is orange. If it's grey, simply select it to change it to orange. When confirming everything is correct, select Add Record.

Once you complete that you need to setup the SRV record for it. Since you activated the Orange cloud the IP masking service is hiding your original IP from attackers. On the left list click the A drop down box and select SRV.

This interface will appear. The service details needed will be below. Please copy the details below onto Cloudflare.
Service name: _minecraft
Protocol: TCP
Name: Same value you set above for the 1st text box.

Select Save to go to the next section.
Set it as the settings below.
Priority: 0
Weight: 0
Port: (Your Server Port) (This Example: 25843)
Target: Your Final Desired Domain (Ex: anything.yourserverdomain.net)

Once you hit save. Click Add Record. Once that's completed. Wait 1-2 minutes and join your server with the domain!

Then you're done. Try to join your server with your set server domain.

Server Only + Subdomain (Dedicated IP) (anything.yourserverdomain.net)
Example Variables
Server IP: 192.43.23.5:25565
Desired Domain: anything.yourserverdomain.net

On the DNS section, ensure you have it set as A on the left hand side. On the 1st text box. Type in the value that you want your players to join with. For example, if you want a player to join with play.yourserverdomain.net, type in play. If you want a player to join the server with mc.yourserverdomain.net. Type in mc. On the 2nd text box, Type in the server ip you have excluding the port (192.43.23.5). Before selecting Add Record, ensure the cloud right next to it is orange. If it's grey, simply select it to change it to orange. When confirming everything is correct, select Add Record.

Once you complete that you need to setup the SRV record for it. Since you activated the Orange cloud the IP masking service is hiding your original IP from attackers. On the left list click the A drop down box and select SRV.

This interface will appear. The service details needed will be below. Please copy the details below onto Cloudflare.
Service name: _minecraft
Protocol: TCP
Name: Same value you set above for the 1st text box.

Select Save to go to the next section.
Set it as the settings below.
Priority: 0
Weight: 0
Port: (Your Server Port) (This Example: 25565)
Target: Your Final Desired Domain (Ex: anything.yourserverdomain.net)

Once you hit save. Click Add Record. Once that's completed. Wait 1-2 minutes and join your server with the domain!

Then you're done. Try to join your server with your set server domain.
Was this article helpful?
Thank you!