[How-To] Using a custom Domain name to join server

Hey everyone! I figured since I got back into heavy development, and also back into FiveM, I’m going to share this tutorial!

So what is this? Do you have a custom domain like oldskoolrp.com? You can use that domain name to connect to the server rather than connecting using an IP. I could go on and on about why this would be better. but let’s just get into it!

  • First off you need administration access to the domain name(DNS is where we will be working)

  • Second, keep in mind I am using Google Domains to make this TUT because that’s where I go, so your registrar may look a whole lot different from mine.

Alright, now we set everything straight.

Log into your registrar. Once you have done that navigate your way to DNS Management.

Find the section where you are able to add custom records.

Now add an “A” record with the subdomain you want to connect with. (fivem1.oldskoolrp.com)

Next, add an SRV record that corresponds to the “A” record you made.(Google users just copy past this and edit “10 10 30120 _cfx._udp.fivem1.oldskoolrp.com.”)

And thats it! It should be working!


Thanks for the help! :grinning:

1 Like

Great tutorial and help thanks man!

Thanks man!

If you wanted to, would you use numbers instead of a name? Would this also mask your public ip address or does this just change the name? Thank you.

So, does this mean I can put this “fivem1.oldskoolrp.com” behind a captcha? so all users should go and pass the captcha before logging?
i’ve seen a server with this method and I wanna use something similar, in order to prevent bot connections (with ddos attack purpose)

For the method you mentioned, this is my first time hearing about it, I’m not sure if it’s a premium feature or not, but my best guess is you should script it on the server and not have it through the domain. This is because you can still connect through the root server.

1 Like

Theres a server in Argentina who has it… altho, seems to he a “premium feature” called playfare…i don’t know …

can someone help me with the srv record plzzz

how you play and get in the game

what? I honestly have no idea what you are asking?

1 Like

Wrong thread bro… Wrong thread.

hey so it works but how can you do this with multiple fivem servers running on the same ip with a different port? I did what you did, except change the 30120 as needed and the subdomain. they all redirect to the main 30120 server…

Because you need to change the subdomain. fivem - fivem1

Hello @TreyWoods , I have a few questions regarding your post since I’m new to this whole world and need to learn a few more things.

  1. Which IPv4 adress did you exactly enter when you created the new record? Your server’s or your domain’s IPv4 address?

  2. What exactly is the 10 10 30120 for and what does each set of numbers represent?

Your domain doesnt have an ipv4 its just that a domain name. The ipv4 address you use is whatever your external server’s ip address is.

as for the second part its a SRV record the 10s are for priority and weight and the 30120 is the port.


Thank you so much @Crutchie , finally understand everything and it worked like a charm!

How do i do this in CentOs tho?? I dont really have buttons to click to. Thanks eiher way

Your operating system has literally nothing to do with managing dns configuration with a domain.

1 Like

If I have 2 servers on the same VPS (Machine) how do I make it so end though the ports are diffierent (30120 & 30125) that they dont connect to the same server cause it keeps happening.