ytdlp.org
On this page

Troubleshooting guide

Fix "HTTP Error 403: Forbidden" in yt-dlp

A 403 means the site accepted your connection and then refused to serve the file. With yt-dlp that almost always comes down to one of four things: a stale extractor, missing auth, a cached token that expired mid-session, or an IP the site does not trust.

Short answer: Update yt-dlp, clear its cache with --rm-cache-dir, then retry with browser cookies. If the same command still gets 403s only on a server or in CI, the IP is being refused, not the command (see below). If downloads have to keep working inside an app, a hosted API such as Importly takes the link and returns the file, transcript or metadata, and it works from servers where self-hosted downloads get blocked, with nothing to install or patch on the box.

Quick answer

Work through these in order — most 403s die at step one or two.

# 1. Update — old extractor logic is the #1 cause
yt-dlp -U

# 2. Clear yt-dlp's cache of expired tokens
yt-dlp --rm-cache-dir

# 3. Retry with signed-in browser cookies
yt-dlp --cookies-from-browser chrome "URL"

This will break again. Get an email next time.

2–4 emails a month, only when something breaks or gets fixed. Unsubscribe anytime.

What each step actually fixes

  • Updating replaces extractor logic the site has already broken. Download URLs are signed and formatted per site, and those schemes change constantly — an old yt-dlp asks for files in a way the site now rejects.
  • Clearing the cache removes stored signature data and tokens that have expired. A stale cache can keep producing 403s even after you update.
  • Cookies cover the cases where the file itself is gated: age restrictions, members-only content, region checks, or anything that needs a signed-in session.

Still 403 after all three?

  • Your IP may be blocked or rate-limited. Datacenter and VPN addresses get refused outright by many sites. Test the same command from a home connection — if it works there, the IP is the whole story.
  • You may be downloading too fast. Some sites 403 mid-download as throttling. Try --limit-rate 2M --sleep-requests 1.
  • The video may be genuinely unavailable — region-locked, private, or taken down. Open the URL in a normal browser from the same machine and confirm it plays at all.
  • You saw "forcing SABR streaming" before the 403. That's a specific YouTube case — formats get skipped and the surviving ones need a PO token. See the SABR/403 guide.
  • On YouTube, try a different player client. YouTube serves formats through several internal clients, and at times only some of them 403 while others still work. When a YouTube 403 survives an update and the IP checks out, force a different client with --extractor-args "youtube:player_client=web_safari", or drop a troublesome one with --extractor-args "youtube:player_client=default,-web_embedded". This is a moving target (which clients work changes as YouTube does — checked November 2026), so treat it as a current workaround, not a permanent fix, and keep yt-dlp updated. See choosing a YouTube player_client for which clients return formats right now and how to test them.

The mistake to avoid

Do not start stacking random flags from old forum threads before updating. Nine times out of ten a 403 is stale extractor logic, and no combination of headers or user agents fixes that — yt-dlp -U does.

Servers & agents

Works on your laptop but not on the server?

Paste a link to see what a hosted API returns, running from servers and agent sandboxes where datacenter IPs get blocked — nothing to install or maintain on the box.

Building this into an app? See the API your backend calls instead

Frequently asked questions

What is the fastest fix for a yt-dlp 403 error?

Work three steps in order: `yt-dlp -U` to replace stale extractor logic, `yt-dlp --rm-cache-dir` to clear expired tokens, then retry with `--cookies-from-browser chrome`. Most 403s die at step one or two, because old extractor logic that asks for files in a way the site now rejects is the single most common cause.

Why does the same yt-dlp command get a 403 only on a server or in CI?

The IP is being refused, not the command. Datacenter and VPN addresses get rejected outright by many sites. Test the same command from a home connection - if it works there, the IP is the whole story. See [why the same command fails on a server](/guides/yt-dlp-blocked-on-server).

Does changing the user agent or adding headers fix a 403?

Almost never. Nine times out of ten a 403 is stale extractor logic, and no combination of headers or user agents fixes that - `yt-dlp -U` does. Don't start stacking random flags from old forum threads before you update.

Can downloading too fast cause a 403 mid-download?

Yes. Some sites return a 403 partway through as a form of throttling. Slow the run down with `--limit-rate 2M --sleep-requests 1` and try again.