This tutorial will work with most DNS services.
Adding the records
- Locate the base IP of your server
- Create an A record in the DNS section of your domain on Cloudflare. You can name the A record anything you want and put the IP of your server without the port in the IPv4 part. Then, click "Add Record." Make sure the name you set isn't a name you want people to use when they enter your game.
- Create an SRV record with the service being "_minecraft" and the protocol TCP. You can change the name to something your visitors would join your server by it such as "play" which would resolve to "play.yourdomain.com".
- Then, find the port listed for your server and set it as your port for your SRV record and make sure your target is the A record plus your domain. If you chose "clyde" for your A record and your domain is "example.com" it would be "clyde.example.com."
Try testing if your DNS records are working by adding your server.
If it works, you can play on your server using your domain with friends, your community, or by yourself.