# Links that put players straight into your server

> Every way to link players to a FiveM server: the cfx.re/join/code link and where to find your code, connect commands in F8, fivem://connect protocol links for websites and Discord, direct IP connect, connecting through a proxy host, and keeping links working when you move hosts.

Source: https://fam-tools.com/guides/fivem-server-connect-link-cfx-re · FAM Tools · published 2026-09-11 · updated 2026-09-11 · about 7 min

**Short answer.** Your server’s join code is the ID at the end of its page in the server browser (`servers.fivem.net/servers/detail/<code>`). Share `https://cfx.re/join/<code>`, which opens FiveM and connects. In F8 players can type `connect cfx.re/join/<code>` or `connect ip:port`. On websites use `fivem://connect/cfx.re/join/<code>`. The code is tied to the server’s listing and licence key, so keep the same key when you change hosts.

## Key points

- Find the code in your server’s browser page URL.
- `https://cfx.re/join/<code>` for Discord and social media.
- `fivem://connect/…` opens the game directly from a website.
- `connect ip:port` in F8 for testing.
- Keep your licence key when moving hosts.

The fewer clicks between “this looks fun” and being in your server, the more players you keep. FiveM supports a short web link, a protocol link that opens the game, and commands for the console. Put the right one on your website, Discord and loading screen.

## All the ways to connect

| Where | Link / command |
| --- | --- |
| Discord, social media | `https://cfx.re/join/abc123` |
| Website button | `fivem://connect/cfx.re/join/abc123` |
| F8 console | `connect cfx.re/join/abc123` |
| Testing / direct IP | `connect 203.0.113.7:30120` |
| Behind an HTTPS connect proxy | `connect "https://play.example.com/"` |

## Finding your join code

1. Open the FiveM server browser (or servers.fivem.net) and find your server.
2. Open its detail page; the URL ends in `/servers/detail/<code>`.
3. That `<code>` is what goes after `cfx.re/join/`.

## A connect button on your website

*index.html*

```html
<a class="play" href="fivem://connect/cfx.re/join/abc123">Play now</a>
<a class="fallback" href="https://cfx.re/join/abc123">Open in browser</a>
```

The protocol link opens FiveM if it is installed; the web link is a fallback that also explains how to get FiveM. From a loading screen, open links with `window.invokeNative('openUrl', …)` — see [interactive loading screens](https://fam-tools.com/guides/fivem-loading-screen-cursor-interactive).

## Moving hosts without breaking links

Use the same licence key on the new machine. Once it starts and heartbeats to Cfx.re, the listing — and the join code — point to the new address. Old direct IP links in Discord will break, which is another reason to always share the `cfx.re/join` link instead of an IP.

## Questions

### How do I get my cfx.re/join link?

Open your server’s page in the server browser; the code at the end of the URL goes after `https://cfx.re/join/`.

### How do I connect to a FiveM server by IP?

Press F8 and type `connect ip:port`, for example `connect 203.0.113.7:30120`.

### How do I make a “Play” button on my website?

Link to `fivem://connect/cfx.re/join/<code>`, with the `https://cfx.re/join/<code>` link as a fallback.

### Will my join link change if I change hosts?

Not if you keep the same licence key; the listing updates to the new address.

## Related

- https://fam-tools.com/guides/fivem-server-list-ranking-visibility
- https://fam-tools.com/guides/fivem-deferrals-connecting-cards
- https://fam-tools.com/guides/fivem-loading-screen-cursor-interactive
- https://fam-tools.com/guides/grow-fivem-server-players
