For your own stream, copy the exact URL shown in YouTube Studio. If your encoder supports RTMPS, use that secure option. The table below explains the common addresses and where each one belongs.
YouTube RTMP URL, backup URL, and stream key
| Field | What to enter | What it does |
|---|---|---|
| Primary RTMP server | rtmp://a.rtmp.youtube.com/live2 | Receives your main video and audio feed. |
| Backup RTMP server | rtmp://b.rtmp.youtube.com/live2?backup=1 | Receives a second feed for the same broadcast. |
| Secure server (RTMPS) | Copy the RTMPS URL from YouTube Studio. | Encrypts the connection from your encoder to YouTube. |
| Stream key | Copy your own key from YouTube Studio. | Connects the incoming feed to your stream. |
The server URL alone cannot start your broadcast. It needs your stream key too. Keep the key private, and use the address YouTube gives you if it differs from these examples.
How to use the YouTube server URL in OBS or another encoder
- Open YouTube Studio and choose Create > Go live. Open or create the stream you want to use.
- In your encoder’s stream settings, select YouTube if a preset is available. Otherwise, choose the custom server option.
- Copy the stream URL from YouTube into the encoder’s Server field. Copy your stream key into its Stream Key field.
- Start the encoder and check the feed in Live Control Room. For a scheduled stream, wait for the preview, then click Go live.
Check your stream’s visibility before testing. Starting the encoder can make a stream live right away, depending on your setup. YouTube explains both workflows in its encoder setup guide.
If you cannot find the key, follow our YouTube stream key guide with screenshots. Use the Copy control even when the key is hidden.

If your app asks for one full URL instead of separate server and key fields, check that app’s instructions for the format. Do not paste your private key into a browser address bar or search box.
Should you use RTMP or RTMPS for YouTube?
RTMP stands for Real-Time Messaging Protocol. It carries video and audio from your encoder to YouTube. YouTube then processes the feed and delivers it to viewers.
RTMPS adds encryption to that connection. Choose your encoder’s YouTube RTMPS preset when it is available, or copy the secure URL from Live Control Room. Plain RTMP does not encrypt the feed in transit.
Do not make a secure URL by adding an s to the protocol alone. The server address must also support RTMPS. YouTube’s RTMPS documentation requires the correct protocol, server, and path, with a connection on port 443.
Prefer a walkthrough on video? Here is our RTMP overview:
What is rtmp://b.rtmp.youtube.com/live2?backup=1?
This is a YouTube backup server address. A backup feed gives YouTube another source to use if the main feed fails. It needs to be set up and sending data before you need it. The URL itself does not create a backup.
For a backup that can survive a computer or network failure, avoid sending both feeds through the same point of failure. Two outputs from one computer still depend on that computer. Two encoders on one internet connection still depend on that connection.
Set up and test the backup feed
- Copy the primary and backup server addresses for the same stream from YouTube Studio. Use the RTMPS addresses if your setup supports them.
- Send the main feed to the primary address and the second feed to the backup address, using the stream key for that broadcast.
- Match the video and audio settings on both feeds. This includes resolution, codecs, bitrate, frame rate, keyframe frequency, and audio settings.
- Start both feeds during a private or unlisted rehearsal. Check Live Control Room for errors.
- Stop the primary encoder and check that playback continues from the backup. Then restore the primary and check which feed is active before ending the test.
YouTube says primary and backup settings must match for failover to work. Its streaming tips also recommend testing the switch by stopping the primary encoder.
Do not assume the stream will switch back to the primary as soon as it returns. Check the active feed in your rehearsal. Backup ingest reduces some risks, but it cannot guarantee an uninterrupted broadcast.
If both feeds share an upload connection, budget for both bitrates plus headroom. Use our streaming bandwidth calculator to plan your upload needs.
rtmp://a.rtmp.youtube.com/live2 not working: what to check
| Problem | What to check |
|---|---|
| The URL will not open in Chrome. | Paste it into your encoder’s Server field. Use the YouTube watch-page link to view or share the stream. |
| The encoder cannot connect. | Copy the complete URL from Live Control Room. Check for spaces or missing characters. Match RTMP or RTMPS to the encoder’s selected mode. |
| YouTube rejects the stream key. | Copy the key for the stream you have open. If you reset it, update the encoder with the new key. |
| RTMPS gives an SSL error or times out. | Use the YouTube RTMPS preset or the exact secure URL. Check that your network allows the connection on port 443. |
| Your channel cannot start a live stream. | Check live-streaming access and any channel restrictions. First-time activation can take up to 24 hours. |
| The feed connects but drops frames. | Check upload speed, bitrate, and encoder performance. A working server URL does not rule out a network problem. |
| The backup feed shows errors. | Match the primary and backup settings, then test both feeds again. |
When a cloud streaming setup makes sense
A local encoder can be enough for an occasional live session. For an ongoing channel, Upstream’s 24/7 live streaming lets you run a cloud stream without leaving your computer on. You can also send a feed to multiple platforms, or use Live Studio for a browser-based production.
If you want to send an encoder feed into Upstream, follow the custom RTMP setup. Use the server and key provided for that destination.
Before your next YouTube broadcast, copy the URL and key from the correct stream, check the preview, and test any backup feed while the stream is private or unlisted.
Keep a live channel running 24/7.
Upload files, build a playlist, and let Upstream run continuous live playout from the cloud without OBS, a VPS, or an always-on computer.


