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
- The code. A private GitHub repository in your account. That repository is the site.
- The host. A Netlify site that builds from your repository.
The first address looks like
something.netlify.app. - 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
- Create a GitHub account: github.com/join.
- Create a Netlify account and sign in with GitHub: app.netlify.com/signup.
- Know the login for your domain name, when you are ready for that step. The files can go live before the name does.
- 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
- Your two accounts exist, and Netlify is signed in with GitHub.
- The zip is an Astro project.
node_modulesanddiststay out of git. A.envfile or a live key stops the job. - A new private repository under your GitHub user. The agent pushes the project there.
-
Netlify builds that repository. The build command is the
buildscript inpackage.json, usuallynpm run build. A static Astro site publishesdist. -
Node version comes from
.nvmrc,.node-version, orenginesinpackage.json. Netlify calls that settingNODE_VERSION. If the repo names none, use the version in Astro’s current docs. - You type any secret values into Netlify → Site configuration → Environment variables. The agent lists the names. It does not invent the values.
- You open the
*.netlify.appURL next to the current site. Homepage, one inner page, images, and any form. - 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.
- 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.tomlorpublic/_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
- GitHub, GitHub Desktop, and a first Netlify deploy — account setup, before this handover.
- Deploy Astro to Netlify — build command,
dist, and the Node setting. Read the repo’s own version pin over the 2025 example. - Custom 404 on Netlify — the error page, once the site is yours.
- Domain transfer — when the domain name itself is changing registrars.
Comments
Approved comments appear below. Log in once with GFAVIP — it applies across the whole site. GFAVIP login
View comments archive