To point a custom domain at a Counter-Strike 2 server, create a DNS A record such as play.example.com that resolves to the server’s public IPv4 address, then have players connect with the complete address, for example connect play.example.com:27015. DNS maps names to IP addresses; it does not store the game port. If your server was started with -port, substitute that value for 27015. You must also forward and allow the same port and keep the server configured for Internet play with sv_lan 0.
Godlike.Host offers hosted Counter-Strike 2 servers with its own game panel, SFTP access and free DDoS protection, if you would rather not host it yourself.
This guide covers the exact DNS, router, firewall and CS2 settings, explains why a portless address is not documented for CS2, and gives a troubleshooting path that separates DNS problems from server-access problems.
As an Amazon Associate I earn from qualifying purchases.
What a custom CS2 address actually does
A domain gives players a memorable name instead of requiring them to remember a changing numeric IP address. When someone enters play.example.com, DNS looks up the name and returns the server’s public IPv4 address. The CS2 client still needs to know which port to contact, so the dependable format is:
connect play.example.com:PORT
For the documented default, that is connect play.example.com:27015. A domain name does not replace port forwarding, firewall rules, a public server endpoint or a valid public-play configuration. It is an additional layer that makes the endpoint easier to share.
#1 Best Overall
- Single-elimination, team-based online shooter
- Completely overhauled with better graphics, new characters, items, and environments
- Package includes Half-Life 2: Deathmatch and Day of Defeat: Source
- Real-world physics adds depth the gameplay
- Internet connection required for online play
Read the address as two separate pieces
The part before the colon is the hostname. It is resolved by DNS and should point to the public IPv4 address. The number after the colon is the externally reachable game/query port. DNS and the port-forwarding rule must agree with the server launch command, but they are configured in different places. Editing an A record cannot correct a blocked port, and opening a port cannot correct an A record that points to the wrong address.
For example, play.example.com:27020 means “resolve play.example.com, then contact port 27020 at the returned address.” If you omit the port, you are relying on client behavior that is not documented for CS2. Share the complete value every time.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
DNS names and server names are different
The DNS label is controlled by your registrar or DNS provider. The in-game name shown in server listings is controlled by CS2 configuration, normally with a line such as hostname "My CS2 Server" in server.cfg. Changing one does not automatically change the other.
Which port should you use?
Steam’s Source Dedicated Server guidance uses UDP port 27015 as the default and notes that the port can be changed. ForgeWorld Gaming’s CS2 guide, updated 10 October 2026, likewise identifies 27015 as the default game/query port and says it moves when the server is launched with -port. Always use the externally reachable port shown by your host or router, not an assumed value.
Before you create the record
Collect these details first. Doing so prevents a correct DNS record from pointing at the wrong endpoint.
- Public IPv4 address: the address visible from the Internet, supplied by your host or shown by the router’s Internet/WAN status.
- External CS2 port: the port players must reach. Use
27015only when the server uses the default; otherwise use the value supplied to-port. - Internal server address: if you self-host, reserve a static address for the machine on your LAN, such as a DHCP reservation. A changing private address can silently break forwarding.
- DNS control: access to the domain’s DNS zone at the registrar or DNS provider.
- Router and firewall access: permission to forward the selected port and allow it through the server’s host firewall.
- CS2 public-play settings: a dedicated launch, a valid Game Server Login Token where required for public play, and
sv_lan 0.
DNS cannot make a private-only machine reachable. If your connection uses carrier-grade NAT (CGNAT) or another arrangement that gives you no inbound public endpoint, an A record can still resolve, but players will not be able to reach the server through ordinary port forwarding. You need a host or network service that provides a publicly reachable endpoint in that situation.
If you do not control a public server at all, a registrar account alone is insufficient. You need a CS2 host or VPS that gives you an Internet-reachable address and tells you which external port is assigned. Hosting panels sometimes map an external port to a different internal port; use the player-facing external value in DNS instructions and connection commands.
DNS record choices: A, CNAME and SRV
For a directly reachable CS2 server, an A record is the baseline. It stores an IPv4 address and nothing else.
| Method | Supplies the port? | CS2 lookup documented? | IP-change portability | Setup and reachability notes |
|---|---|---|---|---|
| A record | No. Players append :PORT. |
Yes, because the client resolves the hostname in the normal connection flow. | Good: update one record when the public IP changes. | Simple at most DNS providers; still requires forwarding, firewall access and a public endpoint. |
| CNAME | No. Players still append :PORT. |
It is only an alias to another hostname; the client still needs the port. | Depends on the target hostname being maintained. | Useful for aliases, but it does not solve port or CGNAT problems. |
| SRV record | Can describe a service port in DNS. | No documented CS2 SRV lookup is established in the cited material. | Potentially useful only if the client explicitly performs the SRV query. | An experiment rather than a dependable CS2 setup; clients that do not query SRV ignore it. |
GameServerKings explains that an A record carries the address and nothing else, while SRV only helps when a game client’s code explicitly asks DNS for an SRV record. Its custom-address guide, checked 19 August 2026, lists Counter-Strike 2 among Source-engine games with no documented SRV support for replacing the normal connect ip:port form. That does not prove that every future CS2 build can never process SRV, but it does mean you should publish and test a hostname with an explicit port.
Rank #2
A CNAME can be useful when another service maintains the destination hostname, but it adds another dependency: if that target changes, expires or is misconfigured, your alias fails too. Neither CNAME nor SRV bypasses a firewall, router, CGNAT or a missing public address. For a single server, an A record is usually the clearest arrangement because you can inspect the exact IPv4 value players should reach.
Free tools Windows power users keep installed
One-click scans. No signup required.
Set up the custom domain step by step
1. Confirm the endpoint and launch port
Check the host control panel, dedicated-server launch command or router configuration. Record the public IPv4 address and the port exposed to the Internet. If the command includes, for example, -port 27020, the address players need is play.example.com:27020, not :27015.
For a self-hosted server, reserve the machine’s internal address in the router’s DHCP settings. The reservation keeps forwarding attached to the same computer after a reboot. Write down both addresses: the private address is used only as the forwarding destination, while the public address is what belongs in DNS.
2. Add an A record
- Sign in to the registrar or DNS provider that is authoritative for your domain.
- Open the DNS management or zone-record screen.
- Choose record type
A. - Enter
playas the host/name if you wantplay.example.com. Some interfaces expect the full name; follow that provider’s field convention and avoid duplicating the domain. - Enter the server’s public IPv4 address as the value. Do not enter the private LAN address such as
192.168.x.x. - Use a short TTL while testing if the provider permits it. A short TTL limits how long resolvers retain an old answer; it does not force every cached or negatively cached answer to disappear immediately.
- Save the record and allow the provider to publish it.
Do not add a port to the A-record value. DNS A records contain an address only. The port belongs in the player’s connection command. A value such as 203.0.113.20:27015 is not a valid A-record value; the address and port must remain separate.
3. Forward the port on the router
Open the router’s port-forwarding page and create a rule from the external CS2 port to the server’s reserved internal address. Forward both TCP and UDP for the chosen game/query port, as recommended in the setup guidance. If the launch port is custom, use that custom number on both sides of the rule unless your host explicitly documents a different external mapping.
Example: if the server is at internal address 192.168.1.50 and launched on 27020, forward external TCP 27020 and UDP 27020 to 192.168.1.50:27020. The exact router labels vary, but the destination machine and port must match the running server.
Steam’s router guidance recommends a static internal IP before creating forwarding rules. Without that reservation, a reboot can assign the machine a new private address while the router continues forwarding to the old one. The DNS record would still be correct, yet remote players would reach the wrong device or no service.
4. Allow the same port through the host firewall
On the server operating system, allow inbound traffic for the selected CS2 port in the host firewall. A router rule cannot override a local firewall rule. Keep the protocol scope aligned with the forwarding rule: allow both TCP and UDP when both are being forwarded.
Check that the rule applies to the network profile used by the server and that it targets the actual dedicated-server process or port. If you change -port, update the firewall rule as well as the router rule; changing only one side creates a partial setup that can be difficult to diagnose.
Rank #3
- Sequel to the hit first-person shooter
- Scientist-with-a-crowbar Gordon Freeman joins a ragtag human resistance fighting extradimensional invaders for the survival of a conquered Earth
- Unnervingly realistic graphics the likes of which have not been witnessed outside of a motion picture or pre-rendered cut scene
- Realistic physics: objects have varied and appropriate mass, density, physical properties
- For 1 player
5. Verify the CS2 configuration
Launch the dedicated server with -dedicated and the intended -port value. For a public server, use a valid Game Server Login Token as required by the hosting setup. Confirm that the server is not LAN-only by setting:
sv_lan 0
If you want an in-game name, set it separately in server.cfg:
hostname "My CS2 Server"
The hostname line changes the displayed server name, not the DNS address. Restart or reload the server as required by your installation so the launch and configuration changes take effect. Keep a copy of the launch command and configuration values so you can compare them with the port-forwarding rule during troubleshooting.
6. Check that DNS returns the intended address
From a command prompt or terminal, query the record:
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →dig play.example.com A
On systems without dig, use:
nslookup play.example.com
The answer should contain the public IPv4 address you recorded in step 1. If it shows an old address, wait for the TTL and any negative-cache period to expire, then query again. If it shows a private address, edit the A record; private addresses are not valid Internet destinations for remote players.
Check the authoritative value after saving and then check from the same network players will use. Different recursive resolvers can update at different times. A short TTL helps during a planned move, but it cannot instantly invalidate every cached response.
7. Test with the complete CS2 command
Enable the CS2 developer console and run:
connect play.example.com:PORT
Replace PORT with the actual external port. To isolate DNS from network access, repeat the test with the numeric endpoint:
connect PUBLIC_IP:PORT
If the numeric address works but the hostname fails, the server path is probably reachable and the fault is DNS resolution, stale client data or an incorrectly entered hostname. If both fail, investigate forwarding, firewall rules, the launch port, public IP, login token and sv_lan.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsDo not change several variables between these two tests. Use the same port and the same running server, changing only the hostname to the numeric IPv4 address. That comparison tells you whether to focus first on DNS or on the network and CS2 process.
Rank #4
- 【INCLUDES】Includes two action trackers. Quickly reset by tipping the tracker forward or back to easily move all the trackers to one side. Makes a fantastic gift. A wide range of uses guarantees your favorite nerd will put this tracker to good use.
- 【ACTION TRACKER】Includes two action trackers. Round pucks slide smoothly between two positions to track actions. Rubber feet on the bottom of the tracker keep it where you want it. Optional rubber bumpers are included for the sliding markers. We found that some people love them and others despise them. We will let you decide which camp you belong to.
- 【QUICK RESET】Tip the tracker forward to instantly reset for the next round.
- 【CUSTOMIZE】Dry erase background which custom labels for any game. Stickers. Markers are elevated off dry erase surface so sliding the markers between the too positions will not wipe off the labels. Perfect adition for tabletop games like Roll for the Galaxy, Here to Slay, Shovel Knight, D&D and many more.
- 【QUALITY - 100% SATISFACTION】This product is made in America by people who care about quality. This product comes with information on how to contact us directly with any questions or concerns.
How players should join
Share the complete endpoint, including the port:
play.example.com:27015
Players using the developer console should enter:
connect play.example.com:27015
For a custom port, replace 27015 everywhere with the value passed to -port. Do not advertise only play.example.com as if it were a guaranteed portless CS2 address. Documented Source-engine connection syntax uses connect ip:port, and no documented CS2 client SRV lookup is established for replacing that form.
Put the endpoint in your community’s pinned message, server description or event announcement exactly as players should type it. A clear example prevents people from copying the DNS label but dropping the port. If you later change the port, update every announcement and test the new value before sharing it.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchKeeping the address working when the IP changes
An A record remains useful when the server’s public IP changes because you can edit one DNS value instead of distributing a new numeric address. The change is not instantaneous for every player: recursive resolvers and clients may retain the old answer until its TTL expires, and failed lookups can also be cached. Keep the TTL short during a planned move, update the record, verify it with dig or nslookup, and tell players to retry after caches have had time to age out.
When changing providers, first confirm the new public IP and externally reachable port, then update DNS, forwarding and firewall rules as a coordinated change. If the new host assigns a different port, the DNS name can stay the same but the shared hostname:port value must change. If the provider gives you a hostname rather than a fixed IPv4 address, a CNAME can create an alias, but it still does not provide a port and does not remove the need for a publicly reachable game endpoint.
Hosting and network limitations
A custom domain works with a rented CS2 host, VPS or self-hosted machine only when the service exposes an address that remote players can reach. Managed hosts may already handle forwarding and firewall rules; in that case, use the public address and assigned port shown in the panel rather than creating local-router rules that do not apply to the host.
On a home connection, the public IPv4 shown by the router must be the address reachable from outside. CGNAT can place several customers behind one shared address and prevent unsolicited inbound traffic. In that situation, DNS still performs its normal name-to-address function, but it cannot create an inbound path. Move the server to a host or network service that supplies a public endpoint instead of trying additional DNS record types.
Recommended Free Tools
Troubleshooting by symptom
The hostname resolves to the wrong IP
- Inspect the A record for spelling, host/name and IPv4 value errors.
- Check that you edited the authoritative DNS provider, not an unused account.
- Query with
digornslookupand wait for TTL or negative-cache expiry if an old answer persists.
The IP works, but the hostname does not
- Confirm the player entered the exact hostname and included
:PORT. - Query the hostname from the affected network to detect resolution differences.
- Clear or wait out stale DNS data, then retry the same
connect hostname:portcommand. - Check for a typo in the subdomain label, especially duplicated domain text caused by a DNS provider that automatically appends the zone name.
Neither the IP nor the hostname works
- Confirm the running server’s
-portmatches the externally forwarded port. - Check both TCP and UDP forwarding and the host firewall rule.
- Verify that the public IPv4 address has not changed.
- Ensure the process started successfully with
-dedicated. - Check the Game Server Login Token for public play.
- Confirm
sv_lan 0rather than a LAN-only configuration. - Check whether the Internet connection uses CGNAT or another arrangement that prevents inbound connections.
Players can see a server but cannot join
Seeing a listing does not guarantee that the join path uses the same port you forwarded. Verify the launch port, the router destination and the firewall rule as one set. A mismatch between the visible endpoint and the actual -port value is a common cause of failed joins. Also confirm the server is not LAN-only and that the login token is valid for the public configuration.
You tried an SRV record and it did nothing
An SRV record only helps a client that explicitly asks DNS for that service record. No documented CS2 SRV lookup is established, so an SRV-only setup is not a reliable replacement for hostname:port. You may experiment on a private test server, but publish the A-record address with its explicit port for normal players.
The address worked yesterday but not today
First compare the current public IPv4 address with the value returned by dig or nslookup. A changed residential or host IP requires an A-record update. Then confirm that the router still forwards to the reserved internal address and that the server is running on the same -port. If DNS is correct but the numeric connection fails too, focus on the host, firewall, token and Internet endpoint rather than the domain.
Best Value
- Electronic Arts 9853 Half Life 2006 Collection PC
Practical checklist before sharing the address
- The A record points to the current public IPv4 address.
- The player-facing port is known and matches
-port, or is the documented default27015. - TCP and UDP forwarding target the server’s reserved internal address.
- The host firewall allows the selected port.
- The dedicated process is running with a valid public-play token.
sv_lan 0is active.digornslookupreturns the intended public IP.- Both
connect hostname:portand, for diagnosis,connect public-ip:porthave been tested. - The shared message includes the port, for example
play.example.com:27015.
What to use as your final setup
For current CS2 servers, use an A record such as play.example.com → public IPv4, forward and allow the chosen game/query port, and tell players to connect with play.example.com:PORT. Steam’s default example is 27015, while a -port launch option takes precedence. There is no documented CS2 SRV workflow, so a portless domain should be treated as an unverified experiment rather than a supported configuration.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Frequently Asked Questions
Can I join a CS2 server with only a domain name and no port?
Use the complete hostname:port form, such as connect play.example.com:27015. An A record stores only an IPv4 address, and no documented CS2 SRV lookup is established for supplying the port automatically.
What DNS record should point to my CS2 server?
Create an A record for a label such as play and set its value to the server’s public IPv4 address. Do not enter a private LAN address or append a port to the record value.
Which port does CS2 use by default?
Steam’s Source Dedicated Server guidance and ForgeWorld Gaming’s 10 October 2026 CS2 guide identify 27015 as the default game/query port. A launch command containing -port changes the value players must use.
Do I need to forward both TCP and UDP?
The setup guidance recommends forwarding both TCP and UDP for the chosen CS2 game/query port, then allowing the same protocols through the host firewall. Match the external port to the server’s launch port unless your host documents a different mapping.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Why does the IP work but the hostname fail?
That result usually isolates the problem to DNS resolution, a stale cached answer, a hostname typo or a missing port in the player’s command. Query the A record with dig or nslookup, then retry connect hostname:port.
Why does DNS resolve correctly but nobody can join?
DNS only supplies the address. Check the router’s TCP/UDP forwarding, the host firewall, the running -port, the public IPv4 address, sv_lan 0, the -dedicated launch and the Game Server Login Token used for public play.
Will a CNAME hide the port?
No. A CNAME aliases one hostname to another but does not provide a game port. Players still need hostname:port, and the target hostname must remain correctly maintained.
What if my home connection uses CGNAT?
An A record can resolve to the address you publish, but ordinary inbound forwarding may not work through CGNAT because you do not have a directly reachable public endpoint. Use a host or network service that supplies one.
How quickly does a changed server IP appear for players?
Resolvers and clients can retain the previous answer until the record’s TTL expires, and failed lookups can also be cached. Use a short TTL before a planned move, update the A record, verify it, and allow caches time to age out.
The Bottom Line
Create an A record from your chosen subdomain to the server’s public IPv4 address, forward and allow the matching TCP/UDP port, run the server with public-play settings including sv_lan 0, and share hostname:port. For the default setup that is play.example.com:27015; if -port specifies another value, use that value everywhere. Treat SRV as an optional experiment, not a documented portless CS2 solution.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




