The YouTube RTMP URL, and how to use it
Ingest servers, ports, and setup for streaming to YouTube.
Skip the setup. Stream to YouTube 24/7 from the cloud.
Upload once, paste your stream key, and StreamZop keeps it live around the clock with automatic restarts.
- No PC or OBS
- Live in ~2 minutes
- Auto-restart 24/7
- Free plan, no card
YouTube's primary RTMP ingest URL is `rtmp://a.rtmp.youtube.com/live2`. It is the address your encoder or streaming service sends video to. Combined with your channel's stream key, it makes your broadcast appear as a live stream on YouTube. RTMP, the Real-Time Messaging Protocol, is the standard YouTube uses to receive live video, and the ingest URL is simply the doorway your video passes through on the way to the watch page. The address is identical for every channel, so it is the stream key, not the URL, that routes video to a specific account. YouTube also runs a backup ingest server and an encrypted RTMPS variant on port 443, but the primary URL above is all most setups need. Once it is entered, you leave the URL untouched and only swap the key if you reset it.
Primary and backup ingest servers
The primary server is rtmp://a.rtmp.youtube.com/live2. YouTube also provides a backup ingest server at rtmp://b.rtmp.youtube.com/live2?backup=1, which some encoders push to at the same time for redundancy. Your full stream target is the ingest URL followed by your stream key. If the primary server ever has trouble, an encoder configured with both keeps the broadcast alive on the backup, which matters most on a long 24/7 stream where a dropout would otherwise end the show.
What the RTMP URL is made of
The ingest address breaks into three parts: the protocol (rtmp:// or rtmps://), the server hostname (a.rtmp.youtube.com for primary, b.rtmp.youtube.com for backup), and the application path (/live2). Your encoder joins this URL to your stream key to form the complete destination. You never edit the URL itself; you only paste it into the Server field and put the key in a separate field.
Does YouTube support RTMPS?
Yes. For an encrypted connection, use rtmps://a.rtmp.youtube.com/live2 on port 443. Standard RTMP uses port 1935. RTMPS is recommended when a network blocks the default RTMP port, which is common on office, school or public Wi-Fi that only allows standard web traffic. The stream key stays the same whether you connect over RTMP or RTMPS; only the protocol prefix and port change.
Where do you find the RTMP URL and key?
Open YouTube Studio, click Create then Go Live, and choose the Stream tab. The Stream URL (the RTMP ingest URL) is under the Stream settings tab, while your Stream key sits at the top-right of the live preview, labeled Stream key: Default stream. The URL is the same for every channel, so what routes your video to your channel is the key, not the address.
Match your encoder settings to the RTMP push
Sending video to the right URL is only half the job; the stream also has to be encoded the way YouTube expects. Pair the ingest URL with the correct live encoder settings, meaning H.264 video, AAC audio and a 2-second keyframe interval, so the broadcast that arrives at the ingest server plays back cleanly for viewers.
Common RTMP connection problems
If an encoder cannot connect to the ingest URL, the cause is usually one of a few things. A network that blocks port 1935 stops plain RTMP outright, which is why switching to rtmps://a.rtmp.youtube.com/live2 on port 443 often fixes a connection that fails on office, school or public Wi-Fi. Pasting the whole address, key included, into the Server field is another common mistake: the URL goes in the Server field and the key goes in its own Stream key field. A key that has been reset in YouTube Studio also stops the old one working, so re-copy it after any reset. And because YouTube accepts only one active connection per key, a second encoder pushing to the same key will clash with the first.
Using the RTMP URL for a 24/7 stream
To keep a video live around the clock, an encoder or a cloud service pushes to this RTMP URL on a loop. This is how a pre-recorded live stream works: the file is sent to the same ingest server a live camera would use. With StreamZop you paste your stream key once, upload a video, and it broadcasts to YouTube's ingest server 24/7 from the cloud, with automatic restarts if the connection drops.
Put your video live 24/7, without a PC.
Upload once, paste your stream key, and StreamZop keeps it live around the clock with automatic restarts.
- No PC or OBS
- Live in ~2 minutes
- Auto-restart 24/7
- Free plan, no card
Frequently asked questions
What is YouTube's RTMP URL?+
The primary RTMP ingest URL is rtmp://a.rtmp.youtube.com/live2, with a backup at rtmp://b.rtmp.youtube.com/live2?backup=1.
Does YouTube support RTMPS?+
Yes, at rtmps://a.rtmp.youtube.com/live2 on port 443. Plain RTMP uses port 1935.
What port does YouTube RTMP use?+
RTMP uses port 1935 and RTMPS uses port 443.
Where do I find my YouTube RTMP URL?+
In YouTube Studio under Create, Go Live, then the Stream tab. It appears as the Stream URL in the Stream settings tab; your stream key is separate, at the top-right of the live preview.
What does live2 mean in the YouTube RTMP URL?+
The /live2 path is YouTube's current ingest application on its RTMP servers. It is part of the fixed ingest URL, so you leave it exactly as shown and only add your own stream key.
Is the RTMP URL the same for every channel?+
Yes. The ingest URL rtmp://a.rtmp.youtube.com/live2 is the same for all channels. What sends your broadcast to your channel is your unique stream key, not the URL.
Why won't my encoder connect to YouTube's RTMP URL?+
The most common causes are a network blocking port 1935 (switch to RTMPS on port 443), the full URL pasted into the wrong field (the ingest URL goes in Server and the key in Stream key), or a stream key that was reset and needs re-copying. Only one encoder can use a key at a time.
Can I use YouTube's RTMP URL with any encoder?+
Yes. The ingest URL rtmp://a.rtmp.youtube.com/live2 is a standard RTMP endpoint, so any RTMP-capable encoder or cloud service works with it, including OBS, FFmpeg and hosted loopers. You paste the URL into the Server field and your stream key into the key field.