On this page
An installed PWA can open at the right URL but treat a later route as outside the app. Before launch, check that your web app manifest’s start_url and scope match the URLs users will actually reach, including redirects and deployment base paths.
This guide provides a small route test and a launch checklist. The example has not been executed here. The W3C manifest specification and current Chrome and Apple documentation were not available for consultation in this run, so verify platform-specific installation and navigation behavior before publication or release.
Key Takeaways
start_urlidentifies the URL the installed app should open; manifestscopedefines the navigation area associated with the installed app.- Manifest scope and service worker scope are different boundaries. Neither replaces server routing or authorization.
- Test both an in-scope and an out-of-scope route from an installed app. Inspecting the manifest alone cannot establish how a platform presents navigation.
- Check the final URLs after redirects, including their origin and path. Treat query parameters as data, not as a way to extend scope.
What PWA start_url and scope control
Consider an app deployed under https://example.com/demo/ with these manifest values:
{
"start_url": "app/home/?source=pwa",
"scope": "app/"
}
If the manifest is served at /demo/manifest.webmanifest, these relative values resolve to /demo/app/home/?source=pwa and /demo/app/ on the same origin. The start URL is inside the declared scope. A route such as /demo/app/settings/ is also inside it; /demo/help/ is outside it.
An in-scope navigation belongs to the installed app’s navigation area. An out-of-scope navigation may be presented differently, depending on the platform and browser. Do not assume it will always open a particular browser tab or window: record what happens on each supported platform.
The trailing slash in /demo/app/ is intentional. It makes the intended directory boundary clearer than /demo/app, which can also resemble the beginning of another path such as /demo/application/. Use a deliberately chosen scope and test similarly named routes.
Advertisement
Reproduce the route check
This minimal static example uses Python’s standard-library HTTP server. It is a navigation test, not a complete production PWA: it has no service worker or offline behavior. Installation requirements and available install controls vary by platform and browser.
1. Create the files
From an empty working directory, run:
mkdir -p demo/app/home demo/app/settings demo/help demo/icons
cat > demo/manifest.webmanifest <<'EOF'
{
"name": "Scope Route Test",
"short_name": "Scope Test",
"start_url": "app/home/?source=pwa",
"scope": "app/",
"display": "standalone",
"icons": [
{
"src": "icons/icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "icons/icon-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}
EOF
cat > demo/app/home/index.html <<'EOF'
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="manifest" href="/demo/manifest.webmanifest">
<title>Scope route test</title>
</head>
<body>
<h1>Scope route test</h1>
<p>Check the current URL to identify the page.</p>
<ul>
<li><a href="/demo/app/home/?source=pwa">Start route</a></li>
<li><a href="/demo/app/settings/">Inside scope: settings</a></li>
<li><a href="/demo/help/">Outside scope: help</a></li>
</ul>
</body>
</html>
EOF
cp demo/app/home/index.html demo/app/settings/index.html
cp demo/app/home/index.html demo/help/index.html
Supply your own valid PNG files at demo/icons/icon-192.png and demo/icons/icon-512.png, with the dimensions stated in the manifest. The commands above create the directory but do not generate those images. Icons alone do not guarantee that a browser will offer installation.
2. Serve and inspect
From the working directory containing demo, start the server:
python3 -m http.server 8000
On the same computer, open http://localhost:8000/demo/app/home/?source=pwa. Confirm that the page loads, then inspect the manifest request in browser developer tools. Check that it returns the intended JSON and that the icon requests succeed. Follow both links in an ordinary browser tab to confirm the server has pages at those paths.
For a phone or another device, localhost refers to that device, not your development computer. Deploy the example to a reachable HTTPS test origin or use an appropriate secure development setup. Check the platform’s current installation and secure-context requirements.
3. Install and navigate
Where the platform offers an install or add-to-home-screen action, install the example and launch it from its installed entry point. Record:
- Whether the installed app opens the home route and whether the
source=pwaquery is present in the requested URL. - How the settings link behaves in the installed app.
- How the help link is presented when it leaves the declared scope.
- The final URL after each navigation, including any redirects.
Repeat on the Chrome and Apple platforms your release supports, noting browser and OS versions. If installation is unavailable, record that as a blocked test rather than inferring installed behavior from the browser tab. Reinstall after manifest changes if necessary, and verify that the installed instance is using the updated configuration.
Check base paths, redirects, and queries
Base paths: Relative manifest members are resolved from the manifest URL, not from the page URL. If you move the example manifest from /demo/ to another directory, recalculate both relative values. For a production app mounted under a subpath, check the deployed manifest URL and resulting absolute URLs rather than relying on local development paths.
Redirects: Inspect the complete redirect chain for the manifest, start route, and important links. A start route that redirects to a login page or a differently mounted app can land outside the intended scope. Also check whether a redirect changes the scheme, host, or port: those changes affect the URL’s origin. Test the final destination in the installed app; inspecting only the original link is insufficient.
Query parameters: The start URL can include a query, such as ?source=pwa. Confirm that the server accepts it and that redirects do not discard information your application needs. A query parameter does not turn an outside path into an inside path. Avoid putting secrets in launch URLs: URLs can appear in logs and browser history.
Manifest inspection has limits: Fetching or parsing a manifest can reveal its values, and an ordinary browser visit can reveal routing and redirects. Neither demonstrates the installed app’s window presentation, installation eligibility, or platform-specific handling of an out-of-scope navigation. Those require an installed-app test.
Advertisement
Manifest scope is not service worker scope
The manifest scope describes which navigations belong to the installed app’s navigation area. A service worker’s scope determines which client pages its registration can control. They are configured separately and can cover different paths.
For example, an installed app may have /demo/app/ as its manifest scope while a service worker is registered for a different permitted path. Being inside the manifest scope does not by itself mean a page is controlled by that worker or works offline. Conversely, service worker control does not make a route part of the installed app’s manifest scope.
If your app uses a service worker, inspect its registration and controlled clients separately in developer tools. Test offline behavior independently, including the start route and any redirect or authentication flow. Worker registration paths and permitted scope can depend on the script location and server configuration.
Common Mistakes
- Setting scope to the start page rather than the app’s route area. A home path may not include sibling routes such as settings.
- Using the wrong deployment prefix. A manifest that works at the origin root may resolve differently when deployed under
/demo/. - Ignoring redirects. A successful request can still finish at a route outside the intended scope.
- Assuming a service worker defines the installed app’s navigation boundary. Inspect and test both configurations.
- Treating a tab test as an installation test. Normal browsing does not reproduce every installed-app presentation.
- Assuming every platform handles an outside route identically. Verify the actual supported browser and OS combinations.
Best Practices
- Choose an explicit, trailing-slash scope that covers the routes intended to stay in the app, and ensure the resolved start URL is inside it.
- Test direct launch, internal links, authentication redirects, and a deliberately out-of-scope link on each supported platform.
- Check the deployed manifest and final URLs after every base-path or routing change.
- Keep server authorization and URL handling independent of manifest scope; scope is not an access-control boundary.
- Before release, consult the W3C Web Application Manifest specification and current Chrome and Apple platform documentation, then record the versions and observed results in your release checklist.
Conclusion
A correct-looking manifest is only the starting point. Resolve its URLs against the deployed manifest location, follow redirects, and test inside and outside routes from the installed app on each supported platform.
What would your domain sell for?
A free TidyURLs account unlocks the Domain Estimator. It prices a name from 191,011 real domain sales.