Static Clone Guide

Clone a Website Into Static Files

Use free browser or terminal tools to save a simple site as HTML, CSS, JavaScript, and images. Then clean it up and deploy it with GitHub Pages.

What This Works For

This workflow is best for simple brochure sites, landing pages, portfolios, old business websites, documentation pages, and static marketing pages. It is not a magic copy of an app.

Good fit

Mostly public pages made from HTML, CSS, images, and light JavaScript.

Needs rebuilding

Forms, booking flows, payments, search, login areas, CMS content, and server-rendered features.

Legal note

Cloning can copy copyrighted design, text, images, and code. Use this for your own sites, migrations, backups, or authorized work.

Option 1: Browser Save

This is the lowest-friction free method. It is useful for one page at a time.

  1. Open the page in your browser.
  2. Use File > Save Page As.
  3. Choose Webpage, Complete if your browser offers it.
  4. Save into a new folder.
  5. Open the saved .html file locally and check what broke.

This usually saves an HTML file plus a folder of assets. It may miss lazy-loaded images, fonts, scripts, videos, and pages linked from the page.

Option 2: Terminal Clone with wget

wget can mirror public static pages and rewrite links so the copy works locally. On macOS, install it with Homebrew if you do not already have it:

brew install wget

Then run:

wget --mirror --convert-links --adjust-extension --page-requisites --no-parent https://example.com/
  • --mirror recursively downloads linked pages and assets.
  • --convert-links rewrites links for local browsing.
  • --adjust-extension saves HTML pages with useful extensions.
  • --page-requisites downloads assets needed to display pages.
  • --no-parent avoids crawling above the starting URL path.

Option 3: Terminal Clone with httrack

httrack is another free website copier. It is often easier for multi-page static sites.

brew install httrack
mkdir cloned-site
httrack https://example.com/ -O cloned-site

After it finishes, open the generated folder and test the local index.html. If the clone pulled too much, start again from a narrower URL such as https://example.com/services/.

Clean Up the Clone

A copied site usually needs cleanup before it is worth deploying.

  1. Find the real site root, usually the folder containing index.html.
  2. Delete tracking scripts, old analytics tags, chat widgets, and dead third-party embeds you no longer need.
  3. Replace absolute production links with local links where appropriate, for example /about/ or about.html.
  4. Check images and fonts load from local files instead of hotlinking another domain.
  5. Update page titles, meta descriptions, Open Graph images, favicon links, and contact links.
  6. Test every nav link and button by opening the local site in a browser.

Test Locally

Opening index.html directly can work, but a tiny local server catches path problems before deploy. If you have Python installed, run this from the site folder:

python3 -m http.server 8080

Then open http://localhost:8080. Click through the site, resize the browser, and check the console for missing files.

Deploy to GitHub Pages Next

Once the static clone works locally, GitHub Pages is a good free next step. Create a repository, commit the cleaned files, push to GitHub, then enable Pages in the repository settings.

Use the full guide

Follow the GitHub Pages deployment doc for the exact repository and Pages settings.

Keep it simple

Your repository root should contain index.html unless you intentionally deploy from a subfolder.

Custom domain later

Get the GitHub Pages URL working first, then connect a custom domain after the files are stable.

Continue to GitHub Pages Deployment

Don't Feel Like Doing This Yourself?

We can help clone an existing site, clean up the static files, rebuild parts that cannot be copied cleanly, and prepare it for hosting. This is useful when the original site is messy, old, slow, or tied to a platform you want to leave.

See Website Cloning Services