How to Download a Complete Website Design Using Linux and Windows Commands
Saving a website page is not always as simple as downloading its HTML file. A modern webpage usually depends on multiple frontend resources, including CSS stylesheets, JavaScript files, images, icons, web fonts, and other external assets.
When you save only the HTML source, the downloaded page may appear broken, unstyled, or completely different from the original website. This happens because the HTML file references external resources that were not included in the download.
Fortunately, Linux and Windows users can use command-line tools such as Wget to download a complete static copy of a webpage together with many of its required frontend files.
This guide explains how to download a website page with its design, styles, scripts, images, and fonts using commands on Linux and Windows. It also explains the limitations of website downloading tools and when a downloaded page may not work exactly like the live version.
What Does Downloading a Complete Website Page Mean?
A complete static webpage download normally includes:
- The main HTML document
- CSS stylesheets
- JavaScript files
- Images and background images
- Icons and logos
- Web fonts
- Media files referenced directly by the page
- Locally converted links for offline browsing
The result is an offline copy of the page that can be opened from your computer without visiting the original website.
However, this does not create a fully functional clone of the website’s backend. Features such as user accounts, payment processing, dashboards, database searches, contact forms, live APIs, and authentication usually require the original server.
The method described here is mainly intended for downloading the visible frontend of a publicly accessible webpage.
Important Legal and Ethical Notice
Before downloading a webpage, make sure you have permission to copy or archive its content.
Website designs, images, text, logos, scripts, and other assets may be protected by copyright, trademarks, licenses, or terms of service. Downloading a page for personal backup, offline reading, testing, migration, or authorized development may be acceptable in many situations, but republishing someone else’s website without permission can create legal problems.
Do not use these commands to bypass authentication, paid access, security restrictions, or website protections.
Download a Complete Webpage on Linux Using Wget
Most Linux distributions provide access to Wget through their package manager.
On Ubuntu or Debian, install Wget with:
sudo apt update
sudo apt install wget
After installation, create a directory for the downloaded page:
mkdir -p ~/Downloads/downloaded-page
cd ~/Downloads/downloaded-page
Now run the following command:
wget \
--page-requisites \
--convert-links \
--adjust-extension \
--span-hosts \
--domains=example.com,www.example.com \
--no-parent \
https://example.com/page.html
Replace:
example.com
with the actual website domain, and replace:
https://example.com/page.html
with the complete URL of the webpage you want to download.
Understanding the Wget Options
Each option in the command has an important purpose.
--page-requisites
This tells Wget to download the files required to display the page correctly. These files may include CSS stylesheets, JavaScript files, images, and other directly referenced resources.
Without this option, Wget may download only the HTML file.
--convert-links
This converts links inside the downloaded files so they work from your local computer.
For example, an online stylesheet URL may be converted into a local file path pointing to the downloaded CSS file.
--adjust-extension
This ensures downloaded HTML documents use suitable file extensions such as .html.
It is especially helpful when the original URL does not end with .html, such as:
https://example.com/about
--span-hosts
This allows Wget to retrieve resources from additional hostnames.
A website may load images, fonts, scripts, or CSS from a content delivery network, subdomain, or external asset server.
Use this option carefully because it can cause Wget to access more than one host.
--domains
This limits downloading to specific allowed domains.
For example:
--domains=example.com,www.example.com,cdn.example.com
This is safer than allowing Wget to follow resources from unlimited domains.
--no-parent
This prevents Wget from moving into directories above the requested page path.
It helps reduce the possibility of downloading unrelated sections of the website.
Download External Fonts, Images, and CDN Resources
Some websites load assets from external services such as Google Fonts, Cloudflare, Bootstrap CDNs, JavaScript libraries, or image-hosting platforms.
A domain-restricted command may not download these external assets.
You can attempt a broader download using:
mkdir -p ~/Downloads/complete-page cd ~/Downloads/complete-page wget \ --page-requisites \ --convert-links \ --adjust-extension \ --span-hosts \ --no-parent \ https://example.com/page
This command does not restrict the allowed domains. It may download assets from third-party services referenced by the page.
Use it carefully because some pages connect to many analytics, advertising, tracking, video, and external service domains.
A safer approach is to inspect the website’s asset domains and add only the required ones:
wget \
--page-requisites \
--convert-links \
--adjust-extension \
--span-hosts \
--domains=example.com,www.example.com,cdn.example.com,fonts.googleapis.com,fonts.gstatic.com \
--no-parent \
https://example.com/page
Save the Downloaded Page in a Specific Directory
You can use --directory-prefix to choose the output directory directly:
wget \
--page-requisites \
--convert-links \
--adjust-extension \
--span-hosts \
--domains=example.com,www.example.com \
--no-parent \
--directory-prefix="$HOME/Downloads/example-page" \
https://example.com/page
This avoids changing directories before running the command.
Download a Website Page on Windows
Windows users have several ways to run Wget.
The most reliable options are:
- Windows Subsystem for Linux
- Git Bash
- A native Windows Wget installation
Method 1: Use Wget Through Windows Subsystem for Linux
Windows Subsystem for Linux, commonly known as WSL, allows you to run Linux commands directly on Windows.
Open PowerShell as Administrator and install WSL:
wsl --install
Restart your computer if Windows requests it.
Open the installed Ubuntu terminal and install Wget:
sudo apt update
sudo apt install wget
Windows drives are available inside WSL under /mnt.
For example, your Windows Downloads folder may be available at:
/mnt/c/Users/YourUsername/Downloads
RUN:
mkdir -p /mnt/c/Users/YourUsername/Downloads/downloaded-page cd /mnt/c/Users/YourUsername/Downloads/downloaded-page wget \ --page-requisites \ --convert-links \ --adjust-extension \ --span-hosts \ --domains=example.com,www.example.com \ --no-parent \ https://example.com/page.html
Replace YourUsername with your Windows username.
The downloaded files will appear in your normal Windows Downloads directory.
Method 2: Use Wget with Git Bash
Git Bash provides a Unix-like terminal on Windows. Depending on the installed version and environment, Wget may be available directly. If it is not available, WSL is generally the easier solution.
After installing Git for Windows, open Git Bash and check whether Wget exists:
wget --version
If Wget is available, create a folder and run:
mkdir -p ~/Downloads/downloaded-page
cd ~/Downloads/downloaded-page
wget \
--page-requisites \
--convert-links \
--adjust-extension \
--span-hosts \
--domains=example.com,www.example.com \
--no-parent \
https://example.com/page.html
Method 3: Use a Native Windows Wget Executable
You can also install a Windows-compatible version of Wget and run it from Command Prompt or PowerShell.
After Wget is installed and added to the Windows PATH, check it using:
wget.exe --version
Then run the command in PowerShell:
wget.exe ` --page-requisites ` --convert-links ` --adjust-extension ` --span-hosts ` --domains=example.com,www.example.com ` --no-parent ` https://example.com/page.html
PowerShell uses the backtick character for multiline commands instead of the Linux backslash.
You can also place the entire command on one line:
wget.exe --page-requisites --convert-links --adjust-extension --span-hosts --domains=example.com,www.example.com --no-parent https://example.com/page.html
Can Wget Download Any Website Perfectly?
No command can guarantee a perfect offline copy of every website.
Wget works best with traditional server-rendered websites where the HTML contains direct references to the required CSS, scripts, images, and other assets.
A downloaded page may be incomplete when the website uses:
- React, Vue, Angular, or similar JavaScript frameworks
- Content loaded after the page opens
- Private APIs
- Authentication or login sessions
- Cloudflare protection
- Temporary signed asset URLs
- Browser-generated content
- WebSockets
- Streaming media
- Backend database queries
- Server-side forms
- Payment systems
- CAPTCHA services
- API-based dashboards
- Strict cross-origin security policies
For example, Wget may successfully download the visual layout of a login page, but the login function will not work offline because it depends on the website’s server and database.
Why Some Downloaded Pages Lose Their Design
A downloaded page may open without styling for several reasons.
The CSS may be hosted on an external domain that was not included in --domains. A stylesheet may also load background images or fonts from another server.
JavaScript may generate the page after it loads, meaning the original HTML contains very little visible content.
The website may also block automated download tools or require special browser headers.
You can inspect the downloaded folder to confirm whether CSS and image files were retrieved:
find . -type f | sort
Search specifically for stylesheets:
find . -type f -name "*.css"
Search for JavaScript files:
find . -type f -name "*.js"
Search for common image formats:
find . -type f \( -name "*.png" -o -name "*.jpg" -o -name "*.jpeg" -o -name "*.w
Download Only One Page Instead of an Entire Website
To download one page and its required assets, avoid recursive crawling options unless they are necessary.
A suitable command is:
wget \ --page-requisites \ --convert-links \ --adjust-extension \ --span-hosts \ --domains=example.com,www.example.com \ --no-parent \ https://example.com/specific-page
This command focuses on the requested page and the resources needed to display it.
Download Multiple Pages Recursively
When you have authorization to archive a larger section of a website, Wget can crawl links recursively.
Example:
wget \ --recursive \ --level=2 \ --page-requisites \ --convert-links \ --adjust-extension \ --no-parent \ --domains=example.com,www.example.com \ https://example.com/documentation/
The --level=2 option limits how deeply Wget follows links.
Avoid unlimited recursion because it may download a very large amount of data.
Alternative: Save a Page Through the Browser
For simple pages, Chrome, Edge, Firefox, and Opera provide a built-in saving option.
Open the page and press:
Ctrl + S
Choose:
Webpage, Complete
The browser normally creates an HTML file and a related asset folder.
For example:
page.html
page_files/
Keep the HTML file and the asset folder together. Moving or deleting the folder may break the page design.
The browser method is convenient, but Wget gives developers more control over domains, directory structure, link conversion, and automated downloading.
Final Recommended Command
For most traditional webpages, start with this command:
mkdir -p ~/Downloads/downloaded-page cd ~/Downloads/downloaded-page wget \ --page-requisites \ --convert-links \ --adjust-extension \ --span-hosts \ --domains=example.com,www.example.com \ --no-parent \ https://example.com/page
If some styles, fonts, or images are missing, identify the external domains used by the page and add them to the --domains option.
Wget is a powerful solution for creating offline copies of public webpages on both Linux and Windows. It can preserve much of a website’s frontend structure, including HTML, CSS, JavaScript, images, fonts, and local links.
However, it should be understood as a static website archiving tool, not a complete website cloning system. Backend features, database operations, authentication, APIs, forms, and dynamic application functionality will normally require the original server or a separate development process.
By AZZANI.
Discussion 0
No comments yet. Be the first to start the discussion!
Leave a Comment