Repository navigation
External Assets and CDN
By default, Website Downloader mirrors resources from the same origin as your start URL and leaves third-party references pointing at the live web. That keeps mirrors small and avoids pulling in the entire internet.
When a site depends on external resources — CDN-hosted CSS/JS, web fonts, image hosts — you can opt in to downloading them.
website-downloader --url https://example.com --download-external-assetsThis downloads external static assets and rewrites the allowed ones to local paths.
website-downloader --url https://example.com \
--external-domains cdn.example.com fonts.gstatic.com-
--external-domainsis an allowlist. Only assets from the listed domains (and their subdomains) are downloaded. - Passing
--external-domainsimplies--download-external-assets, so you don't need both. - This is cleaner and safer than allowing every third-party resource on the page.
Downloaded external assets are placed under a cdn/ folder, namespaced by domain:
example_backup/
index.html
assets/
site.css
cdn/
cdn.example.com/
library.js
fonts.gstatic.com/
font.woff2
References in your HTML, CSS, and JS are rewritten to point at these local copies.
When an external <script> or <link> is localized, the tool removes integrity and crossorigin attributes where needed — those checks assume the original CDN URL and would otherwise break the offline copy.
- Start without external assets and only add domains you actually need — check the page for broken styling or missing fonts, then allowlist those hosts.
- Combine with
--max-asset-bytesto avoid pulling in very large media.
See also: CLI Reference, How It Works.