If yt-dlp gives you this error: “unable to download video: HTTP Error 403: Forbidden” …it means YouTube (or another site) is blocking your request, likely due to one of these reasons:
🔍 Why You’re Seeing 403 Forbidden with yt-dlp
| Possible Cause | Explanation |
|---|---|
| ❌ Missing or outdated cookies | Some videos (e.g. age-restricted, private, premium) require login cookies. |
| 🚫 IP or region blocked | The video may not be available in your country. |
⚠️ Outdated yt-dlp version | YouTube changes often — old versions break. |
| 🧾 Wrong headers (User-Agent) | Some sites reject downloads without proper headers. |
| 🔐 Requires login | For members-only, unlisted, or 18+ content. |
✅ Fixes for yt-dlp 403 Forbidden
✅ 1. Update yt-dlp (ALWAYS first)
Or, if installed via pip:
YouTube updates frequently — a 403 error is often fixed just by updating.
✅ 2. Pass Your YouTube Cookies (for age-restricted or private videos)
Step-by-step:
Go to https://www.youtube.com in your browser (logged in).
Use Get cookies.txt extension for Chrome or similar for Firefox.
Export cookies to a file (e.g.
cookies.txt)Use it in
yt-dlp:
🔐 This is essential for downloading:
Age-restricted content
Private/unlisted videos
Member-only content
✅ 3. Use a Custom User-Agent
Some servers reject requests from unknown clients. You can spoof a browser:
Or combine with cookies:
✅ 4. Try a Proxy or VPN (Geo-blocked content)
Some videos are region-locked. You can use a proxy:
Or run yt-dlp behind a VPN located in the appropriate country.
✅ 5. Force Insecure Connections (if behind a strict firewall)
This tells yt-dlp to try using a basic extractor — works in rare cases.
✅ 6. Use Verbose Mode to Debug
Run with:
This gives detailed output and may show exactly what request is failing.
🧪 Bonus: For Specific Sites (Other than YouTube)
Some sites (like TikTok, Twitter, NicoVideo) require specific workarounds:
Try adding
--refererif needed:Use
--no-check-certificatefor SSL issues:
🧼 Last Resort: Try yt-dlp with --netrc (if account is needed)
If you use .netrc for login credentials:
✅ Summary Fix Checklist
| Fix | Command |
|---|---|
✅ Update yt-dlp | yt-dlp -U |
| ✅ Use cookies | yt-dlp --cookies cookies.txt |
| ✅ Set user-agent | yt-dlp --user-agent "Mozilla/5.0" |
| ✅ Use proxy/VPN | yt-dlp --proxy "http://..." |
| ✅ Verbose debug | yt-dlp -v |
Be the first to comment