M3U8 Returns 200 but Will Not Play? Check the Response Body
A green 200 in the Network panel does not establish that you downloaded a playlist. You may have downloaded a login screen, an application shell or an error document instead. Before changing codecs or increasing retries, compare the final response URL, content type and actual response body.
This guide expands one check in our playback troubleshooting guide into a reproducible local HTTP experiment. It is useful when a playlist URL looks right and the request appears successful, but parsing never gets as far as requesting media.
Verification method — October 22, 2026: We ran the four loopback HTTP fixtures below using Node.js 24.12.0 and its built-in fetch, with 16 response assertions. They cover a playlist-shaped control body, HTML, HTML incorrectly labelled as HLS, and a redirect to a fictional login page. This is a response-inspection experiment, not a player or decoder test. We did not test a real authentication system, CDN, Safari, phone or television. No production service configuration was changed.
The four results
Every final response in this experiment returns 200. Only the control starts with the HLS opening tag.
| Requested path | Final content type | Starts with #EXTM3U | Redirect followed |
|---|---|---|---|
/control.m3u8 | application/vnd.apple.mpegurl | Yes | No |
/html.m3u8 | text/html | No | No |
/mislabelled.m3u8 | application/vnd.apple.mpegurl | No | No |
/redirect.m3u8 | text/html | No | Yes |
The misleading MIME type in the third row does not turn HTML into HLS. Conversely, identifying a plausible opening tag does not validate the rest of a playlist or prove its segments are reachable. Our control intentionally does not serve segment.ts; do not use it as a playback success example.
Reproduce without somebody else's stream
Save this complete script as check-responses.cjs and run node check-responses.cjs with a recent Node.js version that provides fetch. It opens an operating-system-assigned port on 127.0.0.1 only, sends four local requests, checks four properties per response, then closes the server. No package installation, credentials or remote media are needed.
const assert = require('node:assert/strict');
const { createServer } = require('node:http');
const server = createServer((req, res) => {
if (req.url === '/redirect.m3u8') {
res.writeHead(302, { Location: '/login' }); res.end(); return;
}
const playlist = req.url === '/control.m3u8';
const mime = playlist || req.url === '/mislabelled.m3u8'
? 'application/vnd.apple.mpegurl' : 'text/html';
res.writeHead(200, { 'Content-Type': mime });
res.end(playlist ? '#EXTM3U\n#EXT-X-TARGETDURATION:6\n#EXTINF:6,\nsegment.ts\n'
: '<!doctype html><title>Sign in</title>');
});
(async () => {
await new Promise(resolve => server.listen(0, '127.0.0.1', resolve));
const base = 'http://127.0.0.1:' + server.address().port;
const cases = [
['/control.m3u8', true, 'application/vnd.apple.mpegurl', false],
['/html.m3u8', false, 'text/html', false],
['/mislabelled.m3u8', false, 'application/vnd.apple.mpegurl', false],
['/redirect.m3u8', false, 'text/html', true],
];
try {
for (const [path, expectedMarker, expectedType, expectedRedirect] of cases) {
const response = await fetch(base + path);
const body = await response.text();
const marker = body.startsWith('#EXTM3U');
assert.equal(response.status, 200);
assert.equal(marker, expectedMarker);
assert.equal(response.headers.get('content-type'), expectedType);
assert.equal(response.redirected, expectedRedirect);
console.log({ path, status: response.status, marker,
type: response.headers.get('content-type'), redirected: response.redirected });
}
console.log('16 response assertions passed; no media playback tested.');
} finally {
await new Promise(resolve => server.close(resolve));
}
})().catch(error => { console.error(error); process.exitCode = 1; });
The marker check is deliberately narrow: it checks the exact prefix in these controlled strings. It is not an HLS validator, an encoding detector or a safe replacement for the player's parser. The redirect check observes fetch's default redirect-following behavior; it does not describe every player engine.
What to inspect on the failing request
Open developer tools before starting an authorized stream. Select the playlist request, not the page request or a segment. Inspect its response body privately, alongside the headers and redirect chain. If an entry playlist loads successfully but a child request fails, follow that child separately; a successful master response says nothing conclusive about the next response.
| Evidence | Likely investigation | What it does not prove |
|---|---|---|
| HTML title, form or application markup | Login handling, challenge page or application fallback routing | That credentials should be copied into a public player |
| Final URL differs from the requested playlist URL | Redirect destination and authorization flow | That all redirects are erroneous |
| HLS MIME type but HTML body | Origin response generation, proxy rewriting or cached wrong content | That fixing only the header will repair playback |
| Playlist text begins correctly, then child requests fail | Child URLs, permissions, expiry and delivery | That the master document was the entire problem |
A visible access challenge is not permission to bypass it. If you do not operate the service, use the publisher's supported player or ask for a current authorized link. Do not paste cookies, authorization headers, signed URLs or complete private response documents into public reports.
Fix the layer that generated the wrong document
For an application you operate, check whether a catch-all route serves the website shell for missing media paths. Keep legitimate media routes separate from page fallbacks. A missing playlist should not silently become a successful copy of the home page. Test an intentionally nonexistent media path as well as a known working path.
For authentication, decide how unauthorized media requests should behave within the supported client contract. A website login redirect may be appropriate for a human navigation but unsuitable for a background playlist fetch. Do not change security policy simply to accommodate an unrelated player.
For caching, determine which layer produced the document before purging or changing rules. Inspect available response headers and authorized origin logs; repeat a controlled request after the actual routing or authentication fix. Do not assume that every 200 HTML document came from the CDN, or disable caching across the entire site based on one request.
Use the appropriate playlist content type for a real HLS body, but do not treat a header edit as a content conversion. CORS is another independent question: a browser may prevent JavaScript from reading a cross-origin response. These Node loopback checks do not exercise browser CORS. Our developer-tools guide explains the request-level investigation, while the signed child-URL guide covers credentials that do not automatically propagate to children.
Retest beyond the first green request
After correcting the response, verify the master or media playlist body, its final base URL and the next requested resources. Where applicable, include alternate audio, subtitles, initialization data and keys. A request that now parses may simply expose a later delivery failure. Only a separate playback test on the intended browser and device can establish actual playback behavior.