Using the normal domain
First off you need to make “A” record with the name ‘@’ and content ‘your server static IP’ and the Proxy status DNS ONLY, disable the proxy
then you need to make SRV
Service: _minecraft
Protocol: TCP
Name: @
TTL: auto
Priority: 0
Weight: 0
Port: 25565 (or whatever port you are using)
Target: example.com (your domain you cannot use @ here)
the issue with this setup is that your websites will be open with your real IP address
Here is the Solution for this issue
Create “A” record with the name ‘@’ content ‘your server static IP’ leave the Proxy enabled
Create “CNAME” with the name 'play(or something else like minecraft) and the content ‘@’ disable the proxy to be DNS ONLY
Then you need to make SRV
Service: _minecraft
Protocol: TCP
Name: play.@
TTL: auto
Priority: 0
Weight: 0
Port: 25565 (or whatever port you are using)
Target: play.example.com (your domain you cannot use @ here)
Wait 2 minutes and you are done your server is online and you can test it with the status websites for the minecraft servers