For the new owner

Move an Astro site onto your own GitHub and Netlify

Send this page to an AI agent, or to a person you hire. You open the accounts. They put the existing site on a free address first. The domain name moves last.

← Tech  ·  First GitHub account  ·  Astro build settings  ·  Domain name transfer

Three things move, in this order

  1. The code. A private GitHub repository in your account. That repository is the site.
  2. The host. A Netlify site that builds from your repository. The first address looks like something.netlify.app.
  3. The name. DNS for your domain, after the free address looks right.

Google Search Console is a fourth thing. It shows you who visits. Editing the pages happens in GitHub, and Netlify publishes the result.

What you need from the person who has the site now

  • A zip of the project. A fresh private repository is the clean handoff.
  • The names of any settings the site needs, on a separate note. The values go into Netlify’s screen, typed by you.
  • A note if the site sends form email, or runs a function that is not in the zip.

A zip is enough. Their Netlify login stays with them, and the new repository is created under your GitHub user.

Clicks only you can do

  1. Create a GitHub account: github.com/join.
  2. Create a Netlify account and sign in with GitHub: app.netlify.com/signup.
  3. Know the login for your domain name, when you are ready for that step. The files can go live before the name does.
  4. Stay at the computer when the agent asks you to approve a login, a private repository, or a DNS change.

First-time GitHub Desktop clicks are on the GitHub and Netlify starter. This page assumes the project is already Astro.

Order of work

  1. Your two accounts exist, and Netlify is signed in with GitHub.
  2. The zip is an Astro project. node_modules and dist stay out of git. A .env file or a live key stops the job.
  3. A new private repository under your GitHub user. The agent pushes the project there.
  4. Netlify builds that repository. The build command is the build script in package.json, usually npm run build. A static Astro site publishes dist.
  5. Node version comes from .nvmrc, .node-version, or engines in package.json. Netlify calls that setting NODE_VERSION. If the repo names none, use the version in Astro’s current docs.
  6. You type any secret values into Netlify → Site configuration → Environment variables. The agent lists the names. It does not invent the values.
  7. You open the *.netlify.app URL next to the current site. Homepage, one inner page, images, and any form.
  8. Then the domain. Add it in Netlify, then point DNS. Netlify’s steps: add or change a domain. The old host stays up until your domain answers on the new site.
  9. Search Console gets a property for the new site, and the sitemap is submitted, after the name points at Netlify.

If package.json includes @astrojs/netlify, or astro.config sets a server adapter, the publish folder may be different. The agent stops and explains that before it changes the Netlify settings.

What usually breaks on the first build

  • Images that lived in public/ and were left out of the zip.
  • Redirects in netlify.toml or public/_redirects.
  • Form email. Netlify Forms on the old site do not follow the files. Notifications get set up again on the new site.
  • Analytics IDs and other environment values that were typed into the old host and never saved in the repo.
  • The wrong Node version. An older note on /astro6 pins Node 18 from December 2025. Use the version this repository asks for.

The free URL is the place to find these. The domain name waits until that URL looks like the site you have now.

After you own it

A change is a sentence to the agent, a commit on your repository, and a Netlify rebuild. The repository stays private unless you decide otherwise. The old copy comes down only after your domain is serving the new site.

What this page leaves alone

  • Search Console access, by itself, cannot update the Astro site.
  • Moving the domain registration to a new registrar is a separate checklist. Pointing DNS at Netlify can happen while the registration stays where it is.
  • WordPress, a folder of HTML, or a site that is not Astro yet is a different job. The agent should stop when the zip is not an Astro project.

Related

Comments

Approved comments appear below. Log in once with GFAVIP — it applies across the whole site. GFAVIP login

View comments archive