HLS Master Loads but Segments Return 403: Where Did the Query Token Go?

You paste an authorized M3U8 URL into a player. The first request succeeds, but a child playlist, segment, or key returns 403. Before increasing retries, inspect the URL of that failed request: a query parameter on the entry playlist does not automatically become a query parameter on a relative child URL.

That is ordinary URL resolution, not evidence that the player removed a credential. It also does not prove that a missing parameter caused this particular 403. The publisher's authorization rules decide which resources need which credentials.

Verification method — October 20, 2026: We ran seven URL-resolution assertions using Node.js and its WHATWG URL implementation. The source is scripts/test-hls-url-resolution.cjs in this project's repository. All addresses use reserved .test domains and fictional tokens. No network request, CDN authorization rule, browser playback, or real credential was tested. HLS playlist interpretation was checked against RFC 8216; reference resolution was checked against RFC 3986 and MDN. These tests establish URL construction, not whether a server accepts a URL.

Reproduce the missing-query case without a stream

Run this JavaScript in a local Node.js session, not in a public support form:

const master = 'https://cdn.example.test/event/master.m3u8?token=DEMO';
console.log(new URL('variant/index.m3u8', master).href);
// https://cdn.example.test/event/variant/index.m3u8

The relative reference supplies a different path and no query. The base URL provides the directory and origin; its query is not appended to the new path. The same rule applies when the child is a segment or key rather than another playlist.

These were the six direct-base results in our local check; a seventh assertion checked resolution against a fictional post-redirect playlist URL.

Reference in the playlistResult relative to the example master
variant/index.m3u8/event/variant/index.m3u8, without a query
segment.ts/event/segment.ts, without a query
segment.ts?token=CHILD/event/segment.ts?token=CHILD
/keys/key.bin/keys/key.bin, without a query
https://media.example.test/segment.tsThe explicitly named media origin, without the master's query
?token=REPLACEMENTThe same master path with a replacement query; this is not a segment path

You do not need repository access to reproduce the check. Save this complete seven-case example as check-urls.cjs and run node check-urls.cjs locally. It uses fictional addresses and makes no network requests:

const assert = require('node:assert/strict');
const master = 'https://cdn.example.test/event/master.m3u8?token=DEMO';
const cases = [
  ['variant/index.m3u8', 'https://cdn.example.test/event/variant/index.m3u8'],
  ['segment.ts', 'https://cdn.example.test/event/segment.ts'],
  ['segment.ts?token=CHILD', 'https://cdn.example.test/event/segment.ts?token=CHILD'],
  ['/keys/key.bin', 'https://cdn.example.test/keys/key.bin'],
  ['https://media.example.test/segment.ts', 'https://media.example.test/segment.ts'],
  ['?token=REPLACEMENT', 'https://cdn.example.test/event/master.m3u8?token=REPLACEMENT'],
];
for (const [reference, expected] of cases) {
  assert.equal(new URL(reference, master).href, expected);
}
assert.equal(
  new URL('../segment.ts', 'https://edge.example.test/moved/level/index.m3u8').href,
  'https://edge.example.test/moved/segment.ts'
);
console.log('Seven URL-resolution assertions passed.');

Do not replace these examples with live credentials in committed tests or shared output.

Find the first denied resource

Open your browser's Network panel before starting authorized playback. Follow the entry playlist to the selected media playlist, then its initialization section, media segments, and keys when present. Separate audio and subtitles can have their own request chains. Our master-versus-media guide explains those relationships.

For each request, record the resource type, status, origin and path. In a private diagnostic session, compare the parameter names with the publisher's expected scheme. In a shared report, remove parameter values, signed path components, cookies, authorization headers, and account identifiers. Sanitizing only the query is insufficient if the signature lives in the path.

EvidenceNext investigation
Master 200, child playlist 403Does this child require its own signature, a signed cookie, or another supported credential?
Media playlist 200, first segment 403Inspect segment authorization rather than the master parser
Initial playback works, later segments failCheck expiry, clock assumptions and credential lifetime across a longer viewing session
Request redirects to another host or directoryInspect the final playlist location and resulting child URLs
Console says CORS and Network shows a denied responseInspect both issues; enabling CORS does not grant permission to the resource

A 403 alone cannot tell you whether a signature expired, its scope excludes the resource, or the origin deliberately denied access for another reason. Use authorized CDN/origin logs when you operate the service. Do not probe alternative signing schemes on someone else's stream.

Redirects change which base you need to inspect

Suppose a playlist is ultimately delivered at https://edge.example.test/moved/level/index.m3u8. Resolving ../segment.ts against that location produces https://edge.example.test/moved/segment.ts. Our seventh local assertion verifies precisely that construction; it does not exercise an actual HTTP redirect or prove which base a particular player implementation uses.

Record the final response URL and compare the player's actual child request. If a parser resolves from the wrong location, fix that parser using a controlled fixture. If it resolves correctly but the resulting URL is denied, investigate the publisher's delivery and authorization configuration instead.

Fix the authorization design, not just the visible URL

For a service you control, generate correctly authorized child URLs, or use a documented credential mechanism that covers the required resources and works with the target browser/player. Validate playlists, audio, subtitle media, keys and initialization data—not just one successful segment. Credentials that work on the publisher's own site may not be available to an unrelated web-player origin.

Do not blindly copy every master query parameter onto every URI. A signature can be bound to a particular path or query; modifying it may invalidate it. Copying a credential to a different hostname can disclose it. A blanket rewrite can also alter parameters that are unrelated to authentication. Any intentional rewrite needs an explicit allowed-origin policy and the publisher's signing contract, not a general “append token” checkbox.

If you are only a viewer, obtain a fresh, authorized playback link or use the publisher's supported player. M3U8Online cannot extend a token's lifetime, reconstruct a signature, or bypass access controls. For a failed key request, see our AES-128 inspection and conversion record. For a wider request-level investigation, use the developer-tools guide.

Primary references