How to Set a Custom Domain to Connect to a Valheim Server
(Redirected from How to Custom Domain Valheim Server)
To join your Valheim server, on PC or Xbox, without typing the IP each time, set a custom domain or subdomain for it.
Unlike Minecraft, Valheim doesn't read SRV records, so this only points a subdomain at your server's IP. Players type the subdomain in the game's Add server box. When the port isn't 2456, they add a colon and the game port (for example play.mydomain.com:4956). Example:
Setting up the DNS record
You need a domain of your own, with its DNS settings on Cloudflare.
- Sign up for a Cloudflare account and fully set up your domain there.
- On your domain's page in Cloudflare, go to DNS > Records.
Using a subdomain (play.mydomain.com)
- Click the Add record button.
- Set the following:
- Click Save. The subdomain now points to your server's IP address.
- Valheim doesn't read SRV records, so there's no port record to add. Copy the Game Port from the Game Server page instead (the number after the colon in ADDRESS, or Game Port in the window the small "i" next to it opens). Players type it after your subdomain:
Using a domain (mydomain.com)
- IMPORTANT: If there's already an A record (the Type column) for mydomain.com, delete it. Here mydomain.com stands for your own domain.
- Click the Add record button.
- Set the following:
- Click Save. The domain now points to your server's IP address.
- Valheim doesn't read SRV records, so there's no port record to add. Copy the Game Port from the Game Server page instead (the number after the colon in ADDRESS, or Game Port in the window the small "i" next to it opens). Players type it after your domain:
Joining a Valheim server with a custom domain (or subdomain)
- Start the game and click the Start Game button.
- Select a character from the character selection screen and click Start.
- Click the Join Game tab at the top.
- Click the Add server button and type in your domain (or subdomain), followed by a colon and the game port, for example play.mydomain.com:4956 (you can leave the port off only when it's 2456). Then click Connect.
Rent a Valheim server from Survival Servers and be online in minutes.