Building a Website with Astro + Cloudflare Pages

A complete beginner's guide, written so anyone can follow it.

Quick facts about what you're signing up for

Total cost to start$0 (free)
Ongoing costThe website hosting is $0 (free tiers). You pay for just two things: your domain name (about $15/year) and a paid Claude plan (Claude Pro, from about NZ$30/month) so Claude can build and update the site for you. Both can be cancelled any time.
Time to set up first timeAbout 2 hours total, broken into 15–30 min chapters
Time for future updates1–5 minutes per change
Technical skill neededNone to start. You'll pick things up as you go.

How long each part takes

Rough guide so you can plan. You can stop and resume between any of these.

Set up Claude (before you begin)~2 minutes
Install tools, set up Claude Code + create the project (Ch. 3)35–50 minutes
Colours + fonts (Ch. 4)5–10 minutes
Build your pages (Ch. 5)As long as you like; an hour gets a solid start
Go live: GitHub + Cloudflare (Ch. 6)20–30 minutes
Point your domain + DNS (Ch. 7)15–20 minutes, then up to a few hours for it to take effect on its own
Allow AI crawlers in Cloudflare2 minutes (don't skip this; see Ch. 10)
Cancel your old hosting (Ch. 8)5–10 minutes, do this LAST, after the new site is confirmed live

Before you start — pre-flight checklist

Tick these off in your head before you sit down to do this:

☐ A Mac (Intel or Apple Silicon — both work)

☐ Your Mac admin password (the one you use to install apps)

☐ A stable internet connection

☐ At least 5 GB of free space on your Mac

☐ About an hour of focused time (or break it into chunks across days)

☐ A working email address (for GitHub and Cloudflare account signup)

Don't have a Mac? This guide is written for macOS, but the steps work the same on Windows and Linux. The Terminal commands are identical. Some keyboard shortcuts differ (Ctrl instead of Cmd). When in doubt, ask Claude — paste your situation and Claude will translate.

Before you start — read this first

This is built differently from most technical guides. You are not going to be left on your own to figure things out when something goes sideways. That happens — and it's not your fault when it does. It's why most people give up halfway through tutorials like this.

Here's how this one is different: this guide is designed to be used alongside an AI assistant called Claude. The guide tells you what to do. Claude is your real-time helper for anything the guide doesn't anticipate — error messages, weird terminal output, "wait, what did that just do?", or just needing something explained again in different words.

Setting up this chat helper takes about two minutes, and it's free. The next section walks you through exactly how, and we strongly recommend doing it before you touch Terminal or write a single line of anything. (Later, for the part where Claude actually builds your site, you'll add a separate tool called Claude Code that needs a paid Claude plan — we'll tell you exactly when, and what it costs, at that point.)

Between this guide and Claude, there is no point in this process where you have to fend for yourself. If you get stuck, paste what you're seeing into Claude, tell it what step you're on, and it will help. That's the whole idea. You're not doing this alone.

Start here: set Claude up, then let it walk you through this whole guide

This is the most important thing on the page, so do it first. You do not have to follow this guide alone. You can hand the entire guide to Claude and have it walk you through every step, one message at a time, in plain English — checking in with you before each next step, and helping the moment anything looks confusing. Setting this up takes about two minutes.

Step 1 — Open Claude

  1. Go to claude.ai in your web browser.
  2. Sign up, or log in if you already have an account. The free plan is fine for this part.
  3. Click New chat to start a fresh conversation.

Step 2 — Give this guide to Claude

  1. Find this guide file on your computer (the PDF or web page you are reading right now).
  2. Drag it into the chat box — or click the paperclip (or +) icon and choose the file.
  3. Wait a few seconds for it to finish uploading.

Step 3 — Ask Claude to be your step-by-step guide

Copy the message below and paste it to Claude exactly as it is. This tells Claude to lead you through the whole thing:

"I've attached a guide for building a website. I'm a complete beginner and I want to follow it from start to finish. Please act as my personal step-by-step guide. Walk me through it one small step at a time, wait for me to tell you I've finished each step before you give me the next one, explain everything in plain English, and never assume I know any technical words. If I paste in an error message or a screenshot, help me fix it. Let's start with the very first step."

From now on, any time you're unsure what to do, just tell Claude where you are and it will help. Between this guide and Claude, there is genuinely no point where you have to work it out on your own.

Two things that make Claude much easier to use

1. Talk instead of typing. The microphone button next to the chat box turns your speech into text. Tap it, say what you want in plain language, and Claude answers. Much quicker than typing. Available on the Claude website and in the Claude mobile app.

2. Treat it as a conversation, not a command. Ask "what does that mean?", "is there a simpler way?", or "I'm confused, can you explain that again?" any time. Push back if something doesn't fit. The longer one chat goes, the more helpful it gets, because Claude remembers everything you've said in it.
There are two different Claudes — don't mix them up

1. Claude in your browser (claude.ai) — the chat helper you just set up. This is your guide and your question-answerer. The free plan is enough for this one.

2. Claude Code — a separate version of Claude that runs inside your Mac's Terminal and actually builds and edits your website files for you. It's the tool that does the real work in Chapters 4, 5 and 9. You install it a little later, in Chapter 3, Step 8.

Claude Code needs a paid Claude plan (Claude Pro or higher) — the free plan does not include it. So if you want to build the site the easy way (letting Claude do the editing for you), you'll want to be on Claude Pro by the time you reach Chapter 3. You can upgrade now or wait until then, and you can cancel any time.

How to use this guide

This guide is designed two ways at once: as something you can read end-to-end to understand what you're building, OR as something you can skip through to just get the site up. Pick the one that fits how you learn.

Path A — I want to understand what's happening

Read Chapter 1 first for the big picture, then the Reference section at the back for the technical details (what each tool is, how to read the Terminal, common surprises). Then come back and follow chapters 2 through 12 in order. The whole guide takes about 20 minutes to read.

Path B — I just want to get my site up

Skip straight to Chapter 3 (Setting up your project on your computer). Follow the steps in order. If you hit something confusing, the explanations are waiting for you in the Reference section at the back — or just ask Claude.

Contents

Start here → Set Claude up, then How to use this guide (takes 5 minutes total)

Part One — Build your website

  1. What you're building (the big picture)
  2. Before you start — checklist
  3. Setting up your project on your computer
  4. Configuring colours and fonts (Tailwind)
  5. Building the pages
  6. Getting your site live (GitHub + Cloudflare)
  7. Pointing your domain at the new site
  8. Cancelling your old hosting (Webflow, etc.)
  9. How to update your site going forward
  10. What else your website can do
  11. Security and safety — your honest fears, answered
  12. Troubleshooting — when things don't go as planned

Reference — only if you're curious

You don't need any of this to build the site. It's here for anyone who wants to understand what each tool is or what something on screen means.

1. What you're building (the big picture)

A website is a collection of files (HTML, CSS, images, JavaScript) that live on a computer connected to the internet 24/7. When someone types your address into a browser, that computer sends them the files. They see your website.

The setup we're using is called a static site:

That's the big picture. The setup uses a handful of free tools behind the scenes, but you don't need to understand any of them to follow this guide. If you ever want to know what each tool does, the descriptions are in the Reference section at the back.

Ready? Let's get you set up.

2. Before you start — checklist

You'll need:

Time tip Setting it up the first time takes a few hours. After that, normal updates take 1–5 minutes.
Already have a website with a domain? Good news — you keep your domain. You'll point it at your new site once it's built (covered in Chapter 7). If you also want to bring across any pages, copy, or images from your existing site, ask Claude: "I'm migrating my site from [Webflow / Squarespace / Wix / WordPress / etc.] to this new setup. Here's my existing URL: [your URL]. Can you help me plan the transfer — what content to keep, how to move the domain over with no downtime, and how to cancel the old hosting safely?" Claude will walk you through it step by step.

3. Setting up your project on your computer

How this chapter works This chapter takes about 35–50 minutes. We'll go one small step at a time. Each step has its own short explanation right next to it — you don't need to know what's coming next, just follow along. If anything feels confusing, ask Claude.

Step 1 — Install Node.js

Node.js is a small piece of software your Mac needs before we can do anything else. You install it once, the same way you'd install any normal Mac app, and then never have to think about it again. Takes about two minutes.

  1. Open your web browser (Safari or Chrome).
  2. Go to nodejs.org.
  3. You'll see two big green download buttons. Click the one labelled LTS. (LTS stands for "Long Term Support" — the stable version. The site automatically gives you the right file for your Mac.)
  4. The file downloads. It'll be called something like node-v20.x.x.pkg. Open it from your Downloads folder.
  5. A familiar Mac installer window opens. Click Continue → Continue → Agree → Install. Type your Mac password when prompted.
  6. When it says "The installation was successful," click Close. Node.js is now on your Mac.
You won't see Node.js anywhere in your Applications folder — that's correct. Node runs quietly in the background. We'll confirm it installed properly in a moment.

Step 2 — Open Terminal

Terminal is the small window where you'll type a few short commands. You don't need to learn anything about it. Just open it and follow along.

  1. Press Cmd + Space. A search bar appears in the middle of your screen.
  2. Type Terminal.
  3. Press Enter.

What you should see:

📁 belinda — -zsh — 80×24
Last login: Mon Jun 6 09:23:14 on ttys000
belinda@Belindas-MacBook-Pro ~ % _

A small white window with black text. Three coloured dots top-left. The first line is just a greeting. The second line ending in % is where you type.

Step 3 — Check that Node.js installed correctly

Quick sanity check. Click anywhere inside the Terminal window so it's active. Type this exactly, then press Enter:

node --version

You should see something like v20.11.0. If you do, Node is installed and working. If you see "command not found," ask Claude — most likely the install didn't finish.

Step 4 — Tell Terminal to work on your Desktop

We'll put your project folder on your Desktop so it's easy to find later. Type this and press Enter:

cd ~/Desktop

Nothing visible happens. That's normal. You've just told Terminal "from now on, work in the Desktop folder."

📁 belinda — -zsh — 80×24
belinda@Belindas-MacBook-Pro ~ % cd ~/Desktop
belinda@Belindas-MacBook-Pro Desktop % _

The second line shows "Desktop" instead of "~" — that means you're now in the Desktop folder. Correct.

Step 5 — Create your website project

This is the satisfying one. With one command, Astro creates a new folder on your Desktop and fills it with everything needed for your website. Type this and press Enter:

npm create astro@latest

Astro will print some text and then ask you a few questions one at a time. Answer them like this:

QuestionWhat to type
Where would you like to create your new project?Your project name (e.g. DTI website)
How would you like to start your new project?Empty
Install dependencies?Yes
Do you plan to write TypeScript?No
Initialize a new git repository?Yes

It takes a couple of minutes. When it's done, you'll see something like "Liftoff confirmed!" and a new folder will appear on your Desktop.

📁 belinda — -zsh — 80×24
✔ Project initialized
✔ Dependencies installed
✔ Git initialized

  next steps:
  cd DTI website
  npm run dev

🚀 Liftoff confirmed. Explore your project!
Look at your Desktop. There should now be a folder with the name you typed. If it's there, your project is created.

Step 6 — Add Tailwind

Tailwind is a small add-on that makes styling your colours and fonts easier in the next chapter. We add it now while we're set up. First, move into your new project folder:

cd "DTI website"

(If you named your project something else, use that name instead of "DTI website".) Then install Tailwind:

npx astro add tailwind

It'll ask "Continue?" — type y and press Enter each time it asks.

Step 7 — Start your website on your laptop

Last step. This starts your website running on your own laptop so you can see it in your browser. Type this and press Enter:

npm run dev

It prints a URL like http://localhost:4321. Click that link (or copy it into your browser). You'll see your blank website running on your own machine. Only you can see it — that's correct, it's not on the internet yet.

📁 belinda — -zsh — 80×24
  astro  v4.x.x ready in 432 ms

  ➜  Local    http://localhost:4321/
  ➜  Network  use --host to expose

  press h for help, q to quit

To stop the local server later, press Ctrl + C in Terminal.

Step 8 — Install Claude Code (your website builder)

Claude Code is the tool that will actually build and edit your website for you. You talk to it in plain English and it writes the files. You install it once, right now, while Terminal is already open.

This one needs a paid Claude plan Claude Code only works with a paid Claude plan (Claude Pro or higher). If you're still on the free plan, upgrade at claude.ai/upgrade first — it takes a minute, and you can cancel any time. (The browser chat helper you set up at the start stays free; this is the separate tool that does the actual building.)

First, if your website preview from Step 7 is still running, stop it: click the Terminal window and press Ctrl + C. Then type this and press Enter:

npm install -g @anthropic-ai/claude-code

It takes about a minute. When it finishes and you see the % prompt again, start Claude Code by typing:

claude

The first time, it opens your browser to log in to your Claude account. Approve it, come back to Terminal, and you'll see a > prompt where you type your requests to Claude. That's Claude Code, running right inside your project folder. To leave it later, type /exit (or press Ctrl + C twice).

If you see a yellow warning during the install You might see a yellow message that mentions "EBADENGINE" or a Node version number. That's only a warning — Claude Code still installs and runs fine. If typing claude doesn't work at all, tell your Claude browser chat exactly what you typed and what you saw, and it will sort it out.
Chapter 3 complete — what you've done

This is a natural save point.

If you need a break, take one. Close Terminal. Your work is saved. When you come back, open Terminal, type cd ~/Desktop/DTI\ website, then npm run dev, and you'll be right back where you left off.

4. Configuring colours and fonts (Tailwind)

Your brand colours and fonts are set in one place inside your project. You don't need to know which file that is, and you don't need to open or edit it yourself. Claude Code does it for you.

Start Claude Code if it isn't already running (type claude in Terminal, inside your project folder), then say something like:

📁 belinda — claude — 80×24
> Set up my brand colours: plum #3D2438, blush #EFE3DC, antique gold #A6824A. Heading font Georgia, body font system sans.

● Done — I've set up your brand colours. You can now use bg-brand-plum, bg-brand-blush and bg-brand-gold, plus matching text- colours, anywhere on your pages.

_

Claude finds the right styling file for your setup, makes the change, and tells you the colour names you can now use (for example bg-brand-plum for a plum background, or text-brand-gold for gold text). From then on, whenever you want those colours somewhere, you just ask Claude Code and it applies them.

You don't need to memorise any of this Any time you want to change a colour or font later — even months from now — just tell Claude Code in plain English, like "make the headings a warmer gold," and it updates the right place for you. You never edit the styling files by hand.

5. Building the pages

What your project folder looks like

Before we touch anything, here's a map of what's inside your new DTI website folder. Don't memorise this — just glance at it so the words make sense when they come up.

DTI website/
├── public/              ← images and downloadable files
│   └── images/             you'll drop your photos here
├── src/
│   ├── pages/           ← one .astro file per page
│   │   ├── index.astro      = your home page
│   │   ├── about.astro      = /about page
│   │   └── pricing.astro    = /pricing page
│   ├── layouts/
│   │   └── Base.astro   ← the shared wrapper (nav + footer)
│   ├── components/
│   │   ├── Nav.astro    ← reusable nav at top of every page
│   │   └── Footer.astro ← reusable footer at bottom of every page
│   └── styles/
│       └── global.css   ← YOUR COLOURS AND FONTS (Claude edits this)
├── astro.config.mjs     ← Astro's main settings
├── package.json         ← list of installed tools
└── node_modules/        ← installed code (DO NOT TOUCH)
The two files you'll touch most often src/pages/index.astro (your home page content) and your styling file, src/styles/global.css (your brand colours and fonts). Claude Code does the actual editing — you just describe what you want.

Your pages live in src/pages/. Each .astro file is one page. The file name becomes the URL:

Reusable pieces (Nav, Footer) live in src/components/ and get imported by each page. Your overall page wrapper (the thing that puts the Nav at top and Footer at bottom) lives in src/layouts/Base.astro.

The easy way to build Use Claude Code. Open Terminal in your project folder and start a Claude Code session. Then say things like "Add a hero section to the home page with the headline 'One shoot. Unlimited presence.' on plum background." Claude edits the file and saves.

6. Getting your site live (GitHub + Cloudflare)

Step 6.0 — Sign up for GitHub and Cloudflare (if you haven't already)

Both are free. Both take less than two minutes. You sign up the same way you'd sign up for any normal website — email and password.

GitHub:

  1. Open github.com/signup in your browser
  2. Enter your email → create a password → pick a username (this becomes part of your URLs, so choose something businesslike)
  3. Verify with the puzzle they give you
  4. Check your email and click the verification link

What GitHub looks like once you're logged in: a mostly white dashboard with a list of your "repositories" on the left. Repositories (or "repos") are just project folders stored online. You'll have zero to start. We'll create your first ones in Step 6.1.

Cloudflare:

  1. Open dash.cloudflare.com/sign-up in your browser
  2. Enter your email → create a password
  3. Verify your email
  4. You don't need to enter a card. The free tier doesn't ask for one.

What Cloudflare looks like once you're logged in: a dashboard with orange and white branding. Left sidebar has options including "Workers & Pages" — that's where we'll go in Step 6.3.

Two browser tabs, kept open Open github.com and dash.cloudflare.com in separate browser tabs and keep them open through this whole chapter. You'll bounce between them and Terminal a few times. Easier than re-finding each one.

Step 6.1 — Create your GitHub repo

Go to github.com and sign in. Click the + icon in the top-right → New repository. Name it something like yoursite-website (private is fine). This one folder is your whole website, and it's what Cloudflare will watch.

Step 6.2 — Connect your local project to GitHub

First time only — tell Git who you are Before your very first save, Git needs your name and an email (it stamps them on each saved version). Run these two lines once, using your own name and the email you signed up to GitHub with:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
You only ever do this once per computer. If you skip it, the git commit step below stops and asks for it.

Now, in Terminal, inside your project folder, run these (replace YOURUSERNAME with your GitHub username):

git remote add origin https://github.com/YOURUSERNAME/yoursite-website.git
git add .
git commit -m "Initial commit"
git push origin main
On that last line, GitHub will ask you to prove it's you When you run git push, GitHub needs to confirm your identity. Usually a browser window or sign-in prompt appears — just follow it. If instead it asks for a password in Terminal and then rejects it, that's normal and expected: GitHub no longer accepts plain passwords here. You need a "personal access token" instead. The step-by-step fix is in the Troubleshooting section under "Git is asking me for a username and password" — or just paste the error into Claude and it will walk you through it.

Once that push succeeds, your code is on GitHub.

Step 6.3 — Set up Cloudflare Pages

  1. Go to dash.cloudflare.com and sign in
  2. Click Workers & PagesCreate applicationPagesConnect to Git
  3. Authorise Cloudflare to access your GitHub
  4. Select your yoursite-website repo
  5. Settings:
  6. Click Save and Deploy

Below is a simplified layout of each Cloudflare screen — what buttons to look for and what to click. The real Cloudflare interface uses orange and white branding and looks more polished, but the labels and buttons are the same.

cloudflare.com — Dashboard

Workers & Pages

Deploy serverless functions and static sites.

Create application →
↓ click the blue button
Create application — Pages

Choose how to get started:

Upload assets Connect to Git ←
↓ pick "Connect to Git" then choose your repo
Set up builds and deployments

Framework preset

Astro

Build command

npm run build

Build output directory

dist

Save and Deploy
Checkpoint — Cloudflare is set up

If you see "Deployment in progress" and within ~60 seconds it changes to "Deployment successful," it worked. Cloudflare gives you a URL like your-site-abc.pages.dev. Click it to see your site live on the internet.

Step 6.4 — See your site live

You're already done — the push you did in Step 6.2 is exactly what Cloudflare just built. Wait about 60 seconds, then visit the your-site-abc.pages.dev URL Cloudflare gave you (it also emails it to you). Your site is live on the internet.

7. Pointing your domain at the new site

If "DNS" sounds scary, here's the reality DNS just stands for "Domain Name System." It's a phonebook that says "when someone types yoursite.co.nz, send them to this server." All you're doing in this chapter is updating that phonebook entry to point at Cloudflare instead of Webflow. It's six clicks in two browser tabs. If you get stuck on any step, paste a screenshot into Claude and ask "what do I do next?" — Claude can read the page you're on.

If you have your own domain (e.g. yourbusiness.co.nz) you'll change its DNS settings so visitors land on your Cloudflare-hosted site instead of wherever it used to point.

The easiest, most reliable way (recommended) The smoothest path is to move your domain onto Cloudflare itself. In the Cloudflare dashboard, choose Add a domain, type your domain, and Cloudflare gives you two "nameservers." You copy those two into your domain registrar (the company you bought the domain from), replacing what's already there. After that, connecting your domain to your site is basically one click — and it works even for a plain domain like yourbusiness.co.nz. This is easier and more dependable than adding individual records by hand, especially for a main domain (not a "www." one), where the by-hand method sometimes won't work at all. If you're not sure what to change, paste a screenshot of your registrar's DNS page into Claude and ask "which of these do I change?"

If you'd rather add records by hand instead of moving nameservers, here's that path:

  1. In Cloudflare Pages, open your project → Custom domainsSet up a domain
  2. Enter your domain name → Cloudflare gives you DNS records to copy
  3. Log in to your domain registrar (the company you bought your domain from)
  4. Find DNS settings → add the records Cloudflare gave you
  5. Save. Propagation takes a few minutes to a few hours
Caution Don't delete existing DNS records until you've added the new ones AND confirmed they work. If your domain currently points at Webflow or somewhere else, the old records keep your existing site running during the transition.

What you now have

8. Cancelling your old hosting (Webflow, etc.)

Only do this AFTER your new site is fully working at your domain.

Cancelling Webflow:

  1. Log in at webflow.com
  2. Click your profile (top-right) → Workspace settings or Site settings
  3. Go to Billing or Plans
  4. Find your active plan → Cancel plan or Downgrade to free
  5. Confirm cancellation; note the renewal date — you'll still have access until then

You can also export your Webflow site as a backup before cancelling (Settings → Export → ZIP). Useful if you want to keep the design files.

9. How to update your site going forward

Once everything's set up, normal updates are this short:

  1. Open Terminal, navigate into your project folder: cd ~/Desktop/yourproject
  2. Start a Claude Code session
  3. Tell Claude what to change in plain English
  4. Claude edits the files
  5. Run git add . then git commit -m "what you changed" then git push origin main
  6. Wait ~60 seconds. Cloudflare rebuilds. Done.

10. What else your website can do

This kind of website can do almost everything most small-business sites need. Here are the common questions, with the simple answer for each.

Can I add new pages?

Yes, and it's easy. Tell Claude Code "add a page called Pricing" (or About, Services, Gallery, anything). Claude creates the page, links it from your navigation, and you can fill in the content. New pages take about a minute each.

Will my site work on phones and tablets?

Yes, automatically. The way this site is built (Astro + Tailwind) handles phone, tablet, and laptop screen sizes for you. When you tell Claude Code to add or change a section, the result is responsive by default. You can check by opening your site in your phone's browser, or by shrinking your laptop browser window — the layout adjusts on its own.

How do I add photos?

Drop the photo files into the public/images folder inside your project. Then tell Claude Code where you'd like them: "use beach-shoot-1.jpg as the hero image on the home page," or "add the three portrait photos to the About page."

Photos live on your site and load from Cloudflare's fast global network — no extra service needed for normal amounts. If you ever build a huge gallery (hundreds of large photos), Claude can help you switch to a dedicated image host like Cloudinary or Bunny, but you won't need that for a typical site.

How do I add videos?

Best practice: upload your video to YouTube or Vimeo, then embed it on your site. Two reasons:

To embed: upload to YouTube (can be public or unlisted), copy the "Share → Embed" code, and tell Claude Code "embed this YouTube video on the home page." Done.

Can I let people book appointments / make reservations?

Yes. Sign up for a booking service like Calendly, Cal.com, Acuity, or SavvyCal. All have free or cheap plans. They give you either a link or a small piece of embed code. Tell Claude Code "add a Calendly booking widget to my Sessions page" and they'll embed it. Your visitors book through that, and the booking lands in your calendar.

Can people pay me for my services on the site?

Yes. You add a "Buy" or "Book" button that connects to a payment service. The payment service handles the card details safely — you never touch them. Your visitor pays, you get the money, and your site stays simple. Common options:

The setup pattern is the same for all of them: sign up with the payment service, create your product (e.g. "1-hour session, $250"), copy the checkout link or button code they give you, and tell Claude Code to add it to the right page. Your visitor clicks "Buy," lands on the payment service's secure checkout, pays, and the money lands in your bank account a day or two later.

Can I have a portfolio or photo gallery?

Yes. A portfolio is just a page (or a few pages) with images and short descriptions. Tell Claude Code "build me a portfolio page with these five projects" — give the project names, descriptions, and image filenames. Claude lays it out and you fine-tune the look.

Can I collect emails for a newsletter?

Yes. Sign up with an email service like Mailchimp, ConvertKit, Buttondown, or MailerLite. They give you a signup form. Tell Claude Code "add my Mailchimp signup form to the footer" and it goes everywhere on the site. New signups appear in your email service's dashboard, ready to send to.

Can I have a contact form?

Yes. Two common ways:

Can I add a blog?

Yes. Astro is great for blogs. Tell Claude Code "set up a blog with a posts folder." Each post becomes a separate file in a folder, and Astro generates a blog index page automatically. Writing posts means creating new files, which Claude Code can also help with.

Can Google and AI tools find my site?

This setup is one of the best for being found. Because your pages are plain HTML built ahead of time, all your text sits right in the page where search engines and AI crawlers can read it. Many sites built with heavier tools are harder to crawl because their content only appears after scripts run. Yours does not have that problem.

The mistake that quietly kills a site's visibility

Many popular website builders produce what is called a "JavaScript-rendered" site: the page arrives almost empty, and the words only appear after code runs in the visitor's browser. A human sees a normal page. But search engines have to work much harder to read it, and most AI crawlers do not run that code at all, so they see a nearly blank page. Your content becomes invisible to AI, which is a serious problem now that people search through tools like ChatGPT.

The approach in this guide (Astro, which builds your pages into plain HTML ahead of time) avoids the trap completely. Your words live in the page itself, where both Google and AI can read them instantly.

How to check any site, including one you already have: open the live page, right-click, choose "View page source," and look for your actual headings and paragraphs in the code. If your real text is there, you are fine. If you mostly see empty tags and scripts, that site is hard for AI and search engines to read, no matter how good it looks to a human.

To help crawlers along, there are two small files worth adding. Tell Claude Code: "Add a sitemap and a robots.txt that welcomes search engines and AI crawlers, and set my site address in the config."

Why this matters more than it used to People increasingly find businesses through AI tools, not just Google. Welcoming AI crawlers in your robots.txt is a simple way to stay visible as search habits change. None of this works until your site is live and your domain points to it, so it is a launch-day task.
Critical: Cloudflare may be blocking AI crawlers by default

This one is easy to miss and can quietly stop AI tools from ever finding you. When your domain runs through Cloudflare, there is a setting that, on many accounts, is switched on to block AI crawlers, the exact opposite of what most people want. It works by silently rewriting your robots.txt file at the network level — your own file in the project is still correct, but Cloudflare serves a different one on top of it. This has actually happened on a real site built with this guide, so it is not a theoretical risk.

After your domain is live on Cloudflare, open the domain in the Cloudflare dashboard, then in the left sidebar find AI Crawl Control and click into it. It has a few sub-pages — check two of them:
Signals — find the toggle called "Managed robots.txt" and turn it off. When it is on, its own description says exactly what it does: "Cloudflare creates or updates your robots.txt file to signal that your content should not be used for AI training" — that is the thing overriding your own file. Turning it off means your own robots.txt is the one actually served.
Security — a list of individual crawlers (Googlebot, ClaudeBot, GPTBot, PerplexityBot and others) each with their own "Block Crawler" switch. Confirm none of the ones you want (ClaudeBot, GPTBot, OAI-SearchBot, PerplexityBot, Google-Extended) are switched on.

Cloudflare's exact wording and menu layout here has changed before and will likely change again — if what you see does not match this exactly, look for the same idea: something that manages or overrides robots.txt on Cloudflare's side, and a list of crawlers with block switches. Ask Claude to find it if you get stuck.

Always verify it actually worked — do not just trust that the toggle stuck. Visit yourdomain/robots.txt in a browser (or ask Claude to fetch it) and confirm it matches what is in your own public/robots.txt file, with no extra "Disallow" lines for GPTBot, ClaudeBot or Google-Extended that you did not write yourself.

Check this even if you think AI visibility does not matter to you yet. Search is shifting toward AI answers, and a site that AI cannot read will quietly miss out on being found and cited. Time: 2 minutes.

If you are migrating an existing domain rather than starting fresh, this setting only exists to check once your domain is actually added to Cloudflare as a zone (Chapter 7). If your build happens across more than one session — very common for a migration — do not assume this was covered just because you did the main SEO setup earlier. Check it specifically on the day your domain goes live on Cloudflare, even if that is a separate day from when you built the site.

This is not a one-time check. Cloudflare can change what a setting like this defaults to without telling you, and nothing about it shows up anywhere in your code or git history — a dashboard toggle leaves no trace. Put a recurring monthly reminder in place for every live site to re-fetch /robots.txt and confirm it still matches your own file. It takes under a minute and it is the only way to catch this if it silently flips back on.

What about my Google Business Profile?

Your Google Business Profile (the free listing with your map pin, opening hours, photos and reviews) is separate from your website, and it is one of the most overlooked parts of being found, especially for local searches. The two are not the same thing and you manage them in different places.

Connect the two by adding your website address in the "Website" field of your Business Profile. Keep your business name, phone number, and (if you have one) address identical across both, Google rewards consistency. Reviews on your profile are one of the biggest factors in local ranking, so it is worth asking happy clients to leave one.

If you run more than one business, keep a separate Business Profile for each, and point each profile at its own website. Do not merge them.

Add your booking link. If you take bookings or calls, add your scheduling link (such as your Calendly or Cal.com URL) to your Business Profile so a "Book" button appears right on your Google listing. People can then book you straight from search, without even visiting your site. It turns your profile into another booking funnel and signals to Google that you are an active, bookable business, which helps your ranking.

Why this guide bothers with SEO at all Most "build your own website" guides stop at getting the site online. They skip the part that decides whether anyone ever finds it. This guide deliberately covers being found: a sitemap, a robots.txt that welcomes AI, checking that Cloudflare is not blocking AI crawlers, internal links, and your Google Business Profile. A beautiful website that nobody can find is a missed opportunity. Being found is the whole point, and it is the part most guides leave out.

Should I link between my own pages?

Yes, a little. When it reads naturally, link from the text on one page to another relevant page. For example, when a page mentions seeing examples, that phrase can link to your examples page. These in-content links help visitors move around and help search engines understand how your pages relate. Tell Claude Code "add a few natural internal links across my main pages" and it will suggest sensible ones. Do not overdo it; a handful of genuine links beats stuffing links everywhere.

Do I need a privacy policy and terms and conditions?

If you collect any information at all, even just email addresses from a signup form, you should have a privacy policy. It is a short, plain page saying what you collect, why, and how you look after it. In New Zealand this is expected under the Privacy Act.

A terms and conditions page is worth having if you sell anything or provide a service, especially one that relies on third-party platforms. It sets out what people can expect, your refund and cancellation rules, and the limits of your responsibility. Tell Claude Code what your business does and it will draft both pages in plain language.

Get legal pages checked Claude can write solid first drafts, but it is not a lawyer. For anything involving payments, liability, or unusual situations, have a lawyer read the drafts before you launch. Starting from a draft makes that review quick and cheap.

Anything else I can add?

Most third-party services that give you an "embed code" (a small snippet of HTML) can be added to your site. If you find a service you want to use, tell Claude Code: "I want to use [service name] on my site — what's the simplest way to add it?" Claude will look up how and walk you through.

The simple rule If you're wondering "can my site do X?", the answer is almost always yes. Ask Claude how. The web is built on these kinds of integrations.

11. Security and safety — your honest fears, answered

This chapter exists because the questions you have are normal questions and you deserve real answers, not technical hand-waving. Read it once. Refer back when you need to.

The short version A static site built this way is dramatically safer than a typical WordPress or e-commerce site. There's no database to hack, no user accounts to steal, no payment forms on your site. The realistic risks are almost entirely about protecting your accounts (GitHub, Cloudflare, your domain registrar). The rest of this chapter covers exactly how.

What can go wrong (the realistic list)

RiskHow likelyWhat it would mean
Your site temporarily goes offlineLow (a few minutes per year)Visitors see an error page until Cloudflare recovers. Your files are unaffected.
Someone guesses your GitHub or Cloudflare passwordLow if you use a strong password + 2FAThey could change your site content. Fixable.
You accidentally publish something you didn't mean toMedium for everyone learningEasily reversed. Git keeps every previous version.
Your laptop is lost or stolenLowAll your code is on GitHub. You get a new laptop, re-download, keep going.
Someone "hacks" the site itselfVery lowStatic sites have almost no surface to attack (see below).
Your credit card details get exposed via the siteEffectively zeroYour site never touches your card. See "credit card safety" below.

What "site crash" looks like — and what to do

A "crash" for this kind of site means one of three things:

  1. Cloudflare's network has a temporary issue. Visitors see a Cloudflare error page for a few minutes. You do nothing — it resolves itself. Cloudflare has roughly 99.99% uptime, which is a few minutes of unavailability per year across the whole network.
  2. Your most recent change broke something. A page looks wrong or fails to load. Fix: in Terminal, run git revert HEAD then git push origin main. This undoes your last change and re-publishes the previous working version within a minute.
  3. Your domain stops pointing at Cloudflare. Usually because the domain expired (renewal didn't go through) or DNS got changed by accident. Fix: log into your registrar, renew or restore the DNS records.
What you don't have to worry about Your files cannot be "lost" in a crash. Every version of your site is stored in three places: on your laptop, on GitHub, and in Cloudflare's build history. Losing all three at once would require GitHub and Cloudflare to both go out of business in the same week.

"Can my site be hacked?" — the honest answer

Most "hacking" stories you hear about websites are about dynamic sites: WordPress, Shopify, custom databases, sites with user logins. Those have many ways in: SQL injection, weak admin passwords, vulnerable plugins, exposed login forms.

Your site is static. It's HTML and CSS files served from Cloudflare's network. There is:

The realistic ways someone could change your site content:

  1. They guess or steal your GitHub password. Defence: strong unique password + two-factor authentication. Covered below.
  2. They compromise your Cloudflare account. Same defence.
  3. They compromise your domain registrar account and redirect traffic elsewhere. Same defence.

Notice the pattern: every realistic risk is about your account credentials, not about the website's code. Protecting accounts is the actual security work.

Credit card safety — where money lives

Quick clarification before we go on Two different questions get mixed up here.

"Can my visitors pay me on my website?" Yes — see Chapter 10. You add a Buy or Book button that connects to a payment service like Stripe or Payhip. Visitors pay you, money lands in your bank account.

"If my site is hacked, can my visitors' cards be stolen?" No — this section explains why.

Here is exactly where credit cards do and don't enter the picture:

Account / serviceDoes it have your card?Why
GitHub (free tier)NoFree plan, no card needed
Cloudflare Pages (free tier)NoFree plan, no card needed
Your domain registrarYes, for renewalThis is the one place a card sits on file. They charge ~$10–15/year automatically.
Your website itselfNo, neverCard numbers don't pass through your site, even when you sell things — see below.

When you sell something on your site (covered in Chapter 10), the "Buy" button takes the visitor to a separate, secure checkout page run by the payment service (Stripe, Payhip, etc.). Card details are entered THERE, on the payment service's servers, never on yours. The payment service is responsible for keeping that data safe — they're set up for it, with all the banking-grade security. Your site never sees the card.

This is why even if someone managed to break into your website's files, they'd find HTML and CSS — no card data to steal, because there was never any card data to begin with.

Claude on your laptop — what Claude can and cannot do

Reasonable fear: "I'm letting Claude run commands on my computer. What's the boundary?"

What Claude Code can do

What Claude Code cannot do

The model is "approve each step" Claude Code asks before running anything that changes your computer. If a command would do something destructive (delete files, install something major), you see exactly what it wants to do and choose whether to approve. You are never out of the loop.

Sensible practices when working with Claude Code

Protecting your accounts (the actual real risk)

If 95% of realistic threats come from compromised accounts, here's the 95% solution:

1. Use a password manager

Sign up for one of: 1Password, Bitwarden, or iCloud Passwords (built into Apple devices). Let it generate a long random password for each account: GitHub, Cloudflare, your domain registrar, your email. Don't try to remember them. The password manager remembers them for you.

Why this matters: the most common way accounts get compromised is that the user re-used a password that was leaked from some other site years ago. Unique passwords eliminate this entire category of attack.

2. Turn on two-factor authentication (2FA) on these four accounts

Two-factor means: even if someone has your password, they also need a 6-digit code from your phone to log in. Use an authenticator app (Google Authenticator, 1Password's built-in one, or Authy). SMS-based 2FA is better than nothing but apps are stronger.

Save your recovery codes When you turn on 2FA, the service gives you a list of "recovery codes" — usually 8 to 10 of them. Save these in your password manager. If you lose your phone, these codes are the only way back into your account. Lose them and you can be locked out for good.

3. Review who has access — periodically

Every few months, log into GitHub and Cloudflare → Settings → check that no unfamiliar devices, apps, or "deploy keys" are connected. Remove anything you don't recognise.

"What if something happens and I need help?"

If this happensWhat to do first
Your site is showing an error to visitorsCheck Cloudflare status (cloudflarestatus.com). If it's a Cloudflare-wide issue, wait. Otherwise: git revert HEAD then push.
You think your GitHub or Cloudflare account is compromisedChange the password immediately. Turn on 2FA if it isn't on. Check recent activity in account settings.
You receive an email from "GitHub" or "Cloudflare" asking you to click a linkDon't click. Open a fresh browser tab, type the address yourself (github.com, dash.cloudflare.com), log in, check if there's a real notification waiting.
You lose your laptopChange your passwords on a different device (GitHub, Cloudflare, registrar, email). Sign out of all sessions. Your files are safe on GitHub.
You forget which version of the site is liveThe version on the main branch of your production repo is the live one. Cloudflare shows the latest deploy in the dashboard.
You think you accidentally broke somethingDon't push to production until you're sure. Test on your laptop first (npm run dev). If you already pushed and it broke, git revert HEAD and push again.

Phishing — what to watch for

You'll start getting emails about your domain, your hosting, your GitHub repos. Most are real. A few are scams. The pattern to recognise:

Universal rule: when in doubt, don't click. Open a fresh browser tab, type the address by hand, log in directly. If something needs your attention, it'll be in your account dashboard.

Visitor privacy — what you're responsible for

If your site collects any visitor information (contact form, email signup, analytics), some basics apply:

Start with the privacy-friendly option Use a lightweight, privacy-respecting analytics tool (Cloudflare's free Web Analytics, or Plausible) instead of Google Analytics. They don't use cookies, don't require a banner, and don't ship visitor data to advertisers. Your site stays simple and your legal load stays light.

The one-page security summary

Do these five things and you've handled 95% of real risk:

  1. Use a password manager and unique passwords for GitHub, Cloudflare, registrar, email
  2. Turn on two-factor authentication on those four accounts
  3. Save your 2FA recovery codes in the password manager
  4. Never click "log in" links in emails — type the address yourself
  5. Test changes locally (npm run dev) before pushing to production

12. Troubleshooting — when things don't go as planned

Things will occasionally go wrong. They go wrong for everyone, including professionals. The list below covers the most common situations beginners hit and what to do. If your situation isn't here, paste the exact error into Claude and ask for help — that's what Claude is there for.

Terminal says "command not found: npm" (or "command not found: node")

Node.js isn't installed on your Mac yet. Go to nodejs.org and download the "LTS" version. Run the installer. Close and reopen Terminal. Try again.

Terminal asks for my password while installing things

That's normal. Type your Mac admin password. You won't see characters appear as you type — that's also normal (security feature). Press Enter when done.

I'm getting "permission denied" errors

You're trying to install something to a place your account doesn't own. Most often this is fixed by either using sudo (which makes Terminal ask for your password) or — better — by using a tool like nvm to manage Node properly. Ask Claude to walk you through this; the exact fix depends on your setup.

Git says "please tell me who you are" (or "unable to auto-detect email address")

Git just needs your name and email once before it can save anything. Run these two lines (use your own details), then try the git commit again:

git config --global user.name "Your Name"
git config --global user.email "[email protected]"

Git is asking me for a username and password and rejecting them

Since 2021, GitHub no longer accepts passwords via Terminal. You need a "personal access token" instead. In GitHub: Settings → Developer settings → Personal access tokens → Generate new token (classic) → tick "repo" → generate → copy the token. Paste THAT instead of your password.

My Cloudflare build failed

Open the build log in the Cloudflare dashboard. Look for the line starting with Error:. The most common causes:

If you can't tell, paste the whole error log into Claude.

My site loaded but looks completely wrong

Try a hard refresh: press Cmd + Shift + R in your browser. Browsers cache old versions. If that doesn't fix it, the issue is probably in the build itself — open the Cloudflare dashboard and check whether the latest build succeeded.

My site looks great on a computer but is a mess on mobile (squashed into a strip, background spilling out the side, everything zoomed out)

This is one of the most common mobile bugs, and it has one usual cause: something on the page is wider than the phone screen. When a page is wider than the screen, the phone zooms the whole thing out to fit, so everything looks shrunk into a narrow column with the background colour showing on the side.

The usual culprit is a side-by-side (two-column) layout where the columns are told to never shrink below a certain width, but never told to stack on small screens. Two 280px columns side by side simply don't fit on a 360px-wide phone.

The fixes (ask Claude to apply these):

Prevention: always check mobile before you call a page done. Roughly two-thirds of web visitors are on a phone, so mobile isn't an afterthought. Before publishing any page, view it on your phone (or in your browser, right-click → Inspect → toggle the device/phone icon). When you ask Claude to build or change a layout, say "make sure it works on mobile" — it's easy to handle up front and annoying to chase later.

I accidentally deleted my project folder from Desktop

If you pushed to GitHub before deleting, your work is safe online. Go back to Terminal:

cd ~/Desktop
git clone https://github.com/YOURUSERNAME/your-repo-name.git

This re-downloads everything from GitHub. You haven't lost anything. (This is why we use GitHub.)

I broke something and want to start completely over

Don't panic. If you haven't done anything important, here's the safe path:

  1. Make a copy of your project folder to your Desktop, just in case
  2. Delete the original folder
  3. Start the guide from Chapter 3 again
  4. Push to your existing GitHub repo when you're ready

Cloudflare is showing my old domain not the new site

DNS changes take time to propagate — sometimes a few minutes, sometimes 24 hours. Wait. If it's been more than 24 hours, check that the DNS records in your registrar match what Cloudflare told you to use.

Two days in, I've forgotten what I was doing

Open this guide. Open the Claude conversation you set up. Tell Claude what state your project is in. Claude will help you figure out where you are and what's next.

The universal troubleshooting move When in doubt, paste these three things into Claude:
1. What you were trying to do
2. The command you ran (or button you clicked)
3. The exact error message or unexpected result

Claude can almost always work out what's gone wrong from those three pieces.

Reference — for the curious

Everything below is optional.

The guide above is enough to build and run your website. This section is here for anyone who wants to understand what each tool does, what to expect on screen, or what a particular surprise means. Read it cover to cover if you're curious — or dip in only when something on your screen makes you go "wait, what?"

Contents of this section:

The tools, what each one does, and why you need them

Your Mac's Terminal

Terminal is a small window where you type text commands instead of clicking buttons. It's already on your Mac — no installation needed.

How to open it: Press Cmd + Space, type Terminal, press Enter.

What it looks like when it opens:

📁 belinda — -zsh — 80×24
Last login: Mon Jun 6 09:23:14 on ttys000
belinda@Belindas-MacBook-Pro ~ % _

A small white window. Black text. Three little dots in the top-left corner for close/minimise/maximise. That's it.

Why you need it: Most developer tools are controlled by typed commands, not clicked icons.

Used in: Chapter 3 (Setting up your project on your computer).

Node.js and npm

Node.js is a program that lets your Mac run JavaScript code locally (not just in a browser). npm ("Node Package Manager") comes with it — it's like an app store for tiny pieces of code that other developers have shared.

What it looks like: You don't see Node.js as an app with an icon. It runs invisibly in the background after you install it. You'll only ever interact with it by typing node or npm commands into Terminal.

Why you need it: Astro (your site builder) is written in JavaScript. To run Astro on your laptop, you need Node.js. To install Astro, you need npm.

Used in: Chapter 3. You install it from nodejs.org with one click on a familiar Mac installer.

Astro

Astro is the website builder. You write your pages in special .astro files that mix HTML, CSS, and a tiny bit of JavaScript. When you run a build command, Astro turns those files into plain HTML/CSS/JS that any browser can read.

What it looks like: A folder on your Desktop with a name like DTI website, full of files and sub-folders.

Why you need it: Astro lets you split your site into reusable pieces (one Nav, one Footer used on every page) instead of copy-pasting the same code into every file. Changes to the Nav update every page automatically.

Used in: Chapter 3 (creating the folder) and Chapter 5 (building your pages inside it).

Tailwind CSS

Tailwind is a CSS styling system that uses small utility classes (like bg-plum, text-gold, p-4) instead of writing custom CSS for everything. You define your brand colours once, then use them as class names throughout the site.

What it looks like: A styling file inside your Astro folder (usually src/styles/global.css). You'll never edit it by hand — you'll tell Claude Code "set my plum colour to #3D2438" and Claude does it.

Why you need it: Saves hours. Changing your brand colour from gold to bronze means editing one line in one file, not finding every occurrence across many files.

Used in: Chapter 4 (Configuring colours and fonts).

Claude Code (the CLI tool)

Claude Code is a version of Claude that runs inside your Terminal and can directly read, edit, and create files in your project folder. You talk to it in plain English ("change the home page hero copy to X", "add a new page about pricing"), and it makes the edits and saves them.

What it looks like: Same Terminal window as before, but now there's a Claude chat happening inside it. You type your request, Claude responds, files get edited.

📁 belinda — claude — 80×24
> change the hero headline to "One shoot. Unlimited presence."

● I'll update src/pages/index.astro now.
● Done. The home page hero now reads: "One shoot. Unlimited presence."

_

Why you need it: Editing .astro files by hand requires knowing HTML and CSS. Claude Code does the editing for you while you describe what you want.

Used in: Chapters 4, 5 and 9 (building and updating your pages). You install it in Chapter 3, Step 8 with one command: npm install -g @anthropic-ai/claude-code. It needs a paid Claude plan (Claude Pro or higher).

Git

Git is a tool that tracks every change you make to your files. Every save creates a snapshot you can return to. Think of it as "infinite undo" for your project. It's already installed on your Mac.

What it looks like: Nothing visual. Git lives quietly inside your project folder. You interact with it by typing short commands like git status, git add ., git commit -m "..." into Terminal. You don't have to "learn Git" — you'll copy and paste the same five commands forever.

Why you need it: Safety net. If something breaks, you can roll back to a working version. Also required for GitHub and Cloudflare Pages to know what to publish.

Used in: Chapter 6 (Getting your site live). The exact commands are written out for you.

GitHub

GitHub is a free website that stores your project's files online and tracks the history of changes. Each project ("repo") lives at a URL like github.com/yourname/yourproject.

What it looks like: A regular website you log into in your browser. Mostly white with some green and blue accents. Looks more like a clean dashboard than a coding tool. You sign up the same way you'd sign up for any service — email and password.

Why you need it: Two reasons. (1) Backup — if your laptop dies, your project is safe online. (2) Cloudflare Pages watches your GitHub repo, so when you push a change to GitHub, Cloudflare automatically rebuilds and publishes the live site.

Used in: Chapter 6.

Cloudflare Pages

Cloudflare is a company that runs a giant network of servers around the world. Cloudflare Pages is their free service for hosting static websites. You connect it to your GitHub repo once. From then on, every time you push a change to GitHub, Cloudflare builds your site and serves it to visitors from servers near them.

What it looks like: Another regular website (dash.cloudflare.com) you log into in your browser. Orange and white branding. A dashboard with your projects listed.

Why you need it: Free hosting with global speed. The free tier handles plenty of traffic for most small businesses.

Used in: Chapter 6.

Your domain (e.g. yoursite.co.nz)

The domain is the human-readable address visitors type into their browser. You bought it from a domain registrar (the company you pay yearly for it). To make the domain point at your new site, you'll change a few DNS records in your registrar's settings. (DNS = "Domain Name System" — the internet's address book.)

What it looks like: Whatever website you bought your domain from — likely a NZ registrar like discountdomains.co.nz or freeparking.co.nz, or international like Namecheap or GoDaddy. You log in to manage settings.

Used in: Chapter 7 (Pointing your domain at the new site).

How it all fits together

Your LaptopYou + Claude Code edit .astro files
GitTracks every change you make
↓ push
GitHubOnline backup of your project
↓ auto-detected
Cloudflare PagesBuilds and publishes the site
Your VisitorsSee the latest version

In plain English:

  1. You edit .astro files on your laptop with Claude Code
  2. Git tracks every change
  3. You push changes to GitHub with one command
  4. Cloudflare Pages sees the GitHub push and rebuilds your site automatically
  5. Your domain (set up once) points visitors at Cloudflare's servers
  6. Visitors see your latest changes

Reading the Terminal — what you'll see and what it means

The prompt

When Terminal opens, you see something like:

belinda@MacBook-Pro ~ %

That's called the prompt. It's Terminal telling you "I'm ready, type something." The bits mean:

Don't be thrown if you see $ instead of % Some Macs show $, others show %, some show >. All three mean the same thing: "ready for your command." Different shells use different symbols. Ignore which one yours uses.

The blinking cursor

After the prompt there's a blinking block or line — that's just the cursor. It blinks whether something is happening or not. If you ran a command and the cursor is sitting there, the command is probably still running. Wait.

Typing your password

When Terminal asks for your password (it usually says Password:), you type it normally and press Enter. You will NOT see any dots, asterisks, or letters appear as you type. That is on purpose, for security. Just type carefully and press Enter.

Long walls of text after a command

When you install something with npm, Terminal will sometimes print hundreds of lines very fast. Don't try to read all of it. Look at the last few lines. If they say something like added 247 packages in 8s or include the word success or no ERROR in caps, you're fine.

Yellow vs red text

Rule of thumb If Terminal returned you to the prompt (% or $) without saying "Error" or "ERR!", the command worked. Move on.

Yes/no questions

Many setup commands ask questions. They look like this:

Use TypeScript? (Y/n)

The capital letter is the default. So (Y/n) means "yes by default — press Enter to accept." (y/N) means "no by default." If you just press Enter without typing, the capital letter wins.

Useful keyboard shortcuts (memorise these three)

ShortcutWhat it doesWhen to use it
Ctrl + CStop the running commandWhen you want to quit npm run dev or anything stuck
Up arrow ↑Show the previous command you ranSaves typing. Keep pressing to go further back.
Tab keyAutocomplete file or folder namesType cd ~/Des then Tab → it fills in Desktop/
Cmd + C is the wrong one in Terminal On the Mac, Cmd + C is "copy" everywhere except in Terminal, where the shortcut to stop a process is Ctrl + C (the actual Control key, not Command). This trips everyone up. To copy text out of Terminal, you can still use Cmd + C with your mouse selection — the trick is only about stopping running processes.

Diagnostic commands when you're lost

CommandWhat it tells you
pwdWhich folder am I currently in?
lsWhat files are in this folder?
cd ~Take me back to my home folder
clearClear all the messy text from the screen (your work isn't lost)

Copy-paste pitfalls

You'll copy a lot of commands from this guide and from Claude. Three things to watch:

1. Smart quotes vs straight quotes

If you copy a command from a Word doc, email, or PDF, the quotes sometimes get converted from " (straight) to " or " (curly). Terminal will reject curly quotes with an error. If a copied command fails with a weird error, retype the quotes by hand.

2. Multi-line commands

Some commands wrap across multiple visible lines but are one command. When you copy them, copy the whole thing in one go and paste once. Terminal handles the wrapping.

3. Don't paste random commands from the internet

If you find a command on a forum or blog and you don't understand what it does, paste it into Claude and ask "what does this do and is it safe to run?" before running it. Most are safe. Some can damage your system. When in doubt, ask.

Scary moments that are normal

The first time you do this, these things will look alarming. They're all fine.

"Apple cannot verify this app is free from malware"

Comes up when you install Node or another tool from outside the App Store. Click Open or go to System Settings → Privacy & Security → "Allow anyway." It's fine for Node, Cursor, VS Code, and other developer tools.

"X packages have N vulnerabilities" after npm install

You'll see this every time. For a typical Astro site, the vulnerabilities are in build tools that never run on your live site. Ignore unless Claude tells you otherwise.

"npm WARN deprecated" lines

Warning, not error. Means some sub-tool inside the install is old. Your project still works. Ignore.

Terminal sat for 30+ seconds doing nothing after I pressed Enter

Most likely it's still working — npm install and npm create astro can take a minute or two on a slow connection. The blinking cursor doesn't mean "ready." Look at the line above the cursor. If there's no new prompt (% or $), it's still running.

Hundreds of new folders appeared inside my project

That's node_modules. Astro needs ~200 small tools to build your site. They live in that folder. You'll never open it. Don't touch it. Git is set up to ignore it automatically.

"detached HEAD" in git

Sounds terrifying. Just means you're looking at an old version of your code. Run git checkout main to get back to the current version. Nothing is broken.

I closed my laptop and now the site at localhost:4321 won't load

When you close Terminal (or shut your Mac), the local dev server stops. Open Terminal, navigate to your project folder, run npm run dev, and it'll be running again.

I see a giant wall of red text after git push

Read the first or last line, not the middle. The most common cause: GitHub doesn't know who you are yet. The fix is usually one command, which Claude will give you.

Looking under the hood of your site (browser dev tools)

Sometimes Claude will say "check the browser console for errors." Here's how:

  1. Open your site in Chrome, Safari, or Firefox
  2. Right-click anywhere on the page → click Inspect (Safari: needs Develop menu turned on in Preferences first)
  3. A panel opens at the bottom or side of your browser. Click the Console tab
  4. Red lines = errors. Yellow lines = warnings (safe to ignore). White / grey lines = informational
  5. Copy any red lines and paste them into Claude

Close it with the X in the panel corner, or by pressing the same shortcut again (Cmd + Option + I on Mac).

The hard refresh Browsers cache your site to load faster. After a change, do a hard refresh to see the latest version: Cmd + Shift + R. This forces the browser to throw away its cache and reload everything fresh. If your site looks "stuck" on an old version, this fixes it 90% of the time.

SEO and AI search — the truth about how this affects discoverability

You can skip this chapter too This chapter exists for one specific worry: "I heard JavaScript sites are bad for SEO. Will Google still find me?" If that thought has never crossed your mind, jump to the next section. If it has, the short answer is no — your site will be excellent for SEO. The rest of the chapter explains why in detail, for the curious. No technical understanding required to use your site.

This is one of the most misunderstood topics on the internet, so let's address the mechanics. Specifically: does running a site built with JavaScript tools hurt how you rank on Google or appear in AI search results?

The short answer

No. In almost every measurable way, an Astro site on Cloudflare Pages is better for SEO than a typical Webflow site. Page speed, mobile performance, control over meta tags, sitemap quality, and crawlability are all equal or better.

The confusion comes from mixing up two very different things: "a website that uses JavaScript" and "a website that requires JavaScript to display its content." Astro is the first; the SEO problem applies only to the second.

What happens when you build an Astro site

When you run npm run build on your laptop (or when Cloudflare builds the site after you push to GitHub), Astro reads your .astro files and turns them into plain HTML files — the same kind of HTML that's been used to build websites since 1993.

By the time Google's crawler arrives at your website, there is no JavaScript involved. The crawler downloads a plain HTML page with your full content already inside it — exactly like it would from a WordPress, Webflow, or hand-coded HTML site.

The key concept Astro is a build tool, not a runtime tool. The JavaScript runs on YOUR machine (or Cloudflare's build machine) to PRODUCE the website. The website itself that visitors and search engines see is plain HTML.

Where the "JavaScript hurts SEO" myth comes from

The myth is real but it applies to a specific kind of site: Single Page Applications (SPAs). These are sites where you visit one HTML page that's mostly empty, and JavaScript then fills in all the content by talking to a server.

Examples of SPAs: most apps built with React, Vue, or Angular without server-side rendering. Gmail. Twitter. Facebook.

SPAs have historically had SEO problems because Google's crawler had to run the JavaScript to see what was on the page — which it does, but slowly and sometimes imperfectly.

Astro is the opposite of an SPA. It pre-builds everything to HTML so search engines see content immediately, no JavaScript execution required.

Astro vs. Webflow for SEO — honest comparison

FactorAstro on CloudflareWebflow
Page speedExcellent (Cloudflare's global network)Good (Webflow's CDN)
Core Web VitalsExcellent — minimal JS, fast loadsDecent — varies with template
Mobile performanceExcellentGood
Crawlable HTMLYes (static at build)Yes
Custom meta tags / Open GraphFull controlGood (panel-based)
Sitemap.xmlAuto-generated by Astro integrationAuto-generated
Structured data (Schema.org)Full control — paste any JSON-LDLimited by Webflow's UI
Custom URLs / redirectsFull control via filesGood
HTTPSFree automaticIncluded
Robots.txtFull controlEditable

Practical takeaway: in real-world SEO terms (the things Google uses to rank you), Astro on Cloudflare ties or wins on every meaningful dimension. The biggest practical win is page speed, which Google explicitly uses as a ranking signal.

How AI search engines treat your site

"AI search" refers to tools like ChatGPT search, Perplexity, Google's AI Overviews, Claude's web tools, Bing Copilot. These work differently from traditional Google search, and they treat your site differently again:

What matters for SEO and AI discoverability

Ranking signals roughly in order of importance:

  1. Quality content that answers what people are searching for (no tool changes this — you have to write well)
  2. Page speed and mobile experience (Astro on Cloudflare wins big here)
  3. Backlinks from other reputable sites (independent of platform)
  4. Clear page structure with proper headings (Astro gives you full control)
  5. Meta titles and descriptions that match search intent (Astro: full control)
  6. Structured data for rich results (Astro: full control)
  7. Internal linking between pages (independent of platform)
  8. HTTPS, sitemap, robots.txt (Cloudflare provides; Astro generates sitemap)

Common myths, debunked

Myth: "JavaScript-built sites can't be crawled." Reality: Static-generated sites (Astro, Next.js with SSG, Hugo, Jekyll) output plain HTML. Search engines see them just like any other website. Only client-rendered SPAs have historical issues.
Myth: "Webflow / Squarespace / Wix are better for SEO because they handle it for you." Reality: They make SEO settings easier to access via menus. They don't make the SEO itself better. Astro lets you do everything they do, plus more, with no UI restrictions.
Myth: "You need WordPress for serious SEO." Reality: WordPress doesn't have SEO superpowers. It has popular plugins (Yoast, Rank Math) that nudge you to write better titles and descriptions. You can do the same things by hand in Astro — and your site will load faster.
Myth: "Static sites can't rank for competitive keywords." Reality: Many of the highest-traffic sites on the internet are static. Speed, semantic HTML, and content quality matter more than the rendering method.
Myth: "AI search will replace SEO so it doesn't matter." Reality: AI search engines still need to find and read your content. They use crawlers that fetch HTML. Sites that are fast, semantic, and well-structured are easier for AI to read and quote.

What you should do for SEO in your new site

  1. Use real headings (one <h1> per page, then <h2>, <h3> in order) — Claude Code can do this for you
  2. Write a unique meta title and meta description for every page — these show up in Google search results
  3. Use descriptive alt text on every image — helps Google Images and screen readers and AI
  4. Install Astro's sitemap integration: npx astro add sitemap — one command, done
  5. Add structured data (JSON-LD) for your business — Claude Code can paste this in for you
  6. Write useful content. The single biggest SEO factor is "does this page help the person who searched?"

The technical SEO checklist — copy this for every site you build

Everything above is the "why". This is the "what to do". Each item is something Claude Code can set up for you in minutes. The fastest way to use this on a new site is to paste the whole list to Claude and say "set all of this up for my Astro site". Once it is done, a new site is technically sound from day one and you never have to remember the details.

Say this to Claude on any new site "Please set up technical SEO for this Astro site: canonical URLs, Open Graph and Twitter Card tags, JSON-LD structured data (Organisation sitewide, plus BlogPosting and BreadcrumbList on articles), a robots.txt that welcomes AI crawlers, the sitemap integration, one H1 per page with ordered headings, and descriptive alt text on every image."
ItemWhat it doesWhere it goes
Canonical URLTells Google the one official address for each page, so duplicates (with/without trailing slash) don't compete.<link rel="canonical"> in your base layout
Open Graph + Twitter tagsControls the title, description and image that appear when your link is shared on LinkedIn, Facebook, etc. This is also what sets the picture beside your link.<meta property="og:..."> in your base layout
Structured data (JSON-LD)Lets Google and AI engines understand what you are: a business, an article, a person. Powers rich results and helps AI quote you correctly.<script type="application/ld+json"> — Organisation sitewide, BlogPosting + BreadcrumbList on blog posts
robots.txt (AI-friendly)Lets search engines AND AI crawlers (GPTBot, PerplexityBot, ClaudeBot, Google-Extended) read your site, and points them to your sitemap.public/robots.txt
XML sitemapA map of every page so search engines find them all.npx astro add sitemap (set site: in astro.config.mjs)
One H1 per page, ordered headingsHelps Google and AI understand the structure of each page.Your page content
Unique title + meta descriptionThe clickable headline and summary in Google results. One per page, never duplicated.Passed into your base layout per page
Descriptive image alt textHelps Google Images, screen readers, and AI. Use real descriptions, sensible file names (not IMG_1234.jpg).Every <img>
Fast-loading mediaProtects your Core Web Vitals score (a ranking signal). Lazy-load videos, give images fixed dimensions.Your page content

After setup, validate it (free tools)

  1. Google Search Console (search.google.com/search-console) — verify the site, submit your sitemap (https://yourdomain/sitemap-index.xml), and watch which pages get indexed. Do this for every new site.
  2. Rich Results Test (search.google.com/test/rich-results) — paste a page URL to confirm your structured data is valid.
  3. PageSpeed Insights (pagespeed.web.dev) — confirm your Core Web Vitals are in the green.
  4. Bing Webmaster Tools — same idea as Search Console, for Bing (which also feeds some AI search).
One thing the tools won't do All of the above is the technical half. The other half is content quality and backlinks — writing pages that genuinely answer what people search for, and getting other reputable sites and your own LinkedIn to link back to you. No checklist replaces that. The technical setup makes sure your good content is findable; the content is what makes you rank.

Migrating an existing site — keeping the rankings you already have

If you're replacing a site that's already live and already ranking (this was written after doing exactly this for two real sites), this section is the one that actually protects your rankings. Everything above matters for a brand-new site; this is the extra layer for a site with history.

Do this BEFORE you build, not after Pull the full list of every URL your old site ever had — not just the pages in your nav menu. Ask Claude: "Look up every URL the Wayback Machine has ever recorded for [your domain] using the CDX API (web.archive.org/cdx/search/cdx?url=yourdomain.co.nz*&output=text&fl=original&collapse=urlkey), and list them all." This catches the pages people forget: old "thank you" pages, alternate contact-form URLs, blog category archives, an old "/services" landing page. Every one of these can carry backlinks or rankings you don't want to lose.
RuleWhy it matters
Keep your main page URLs identical. If the old site had /headshot-photography, the new one should too — don't rename it to /headshots just because it reads better.Google already trusts that exact address. Changing it means starting that page's trust from scratch.
301-redirect every old URL that won't exist at its old address — including the secondary ones, not just your nav pages.A 301 tells Google "this page permanently moved here" and passes its ranking value to the new page. Skip it, and that value is simply lost.
Use a real _redirects file for the redirects, not just Astro's built-in redirects config. Ask Claude Code to create public/_redirects with one line per old URL: /old-url  /new-url  301Astro's own redirects setting (in astro.config.mjs) works, but for a static site it builds an HTML page that redirects itself — not a true server-level redirect. Cloudflare's _redirects file does the redirect at the edge, before the browser even loads a page. It's the more standard, more reliable version of the same thing.
Build a real 404 page (src/pages/404.astro).Without one, Cloudflare Pages quietly serves your homepage — with a "200 OK, this page exists" status — for any URL that doesn't match, including typos and long-gone old pages. Google calls this a "soft 404" and flags it as a data-quality problem, because a page that's actually gone should say so.
A mistake worth naming: it's easy to redirect the pages you remember and miss the rest On one real migration, the main service pages, pricing, and contact page were all redirected correctly — but a handful of older secondary URLs (an alternate contact-form link, a "thank you" page, blog category archives) were left unmapped and were quietly soft-404ing to the homepage instead. Nothing broke visibly — the site looked fine — but those old addresses weren't passing their value anywhere. The fix was going back to the Wayback Machine's full URL history (not just the current nav) and adding a proper 301 for every single one, plus a real 404 page so anything genuinely gone says so honestly. This is exactly why the "pull the full old-URL list first" step above exists — it's easy to skip because the site looks done without it.

What's normal after you flip the switch

Even a perfect migration causes some short-term ranking wobble, because Google has to re-crawl and re-evaluate your pages at their new home. This is documented directly by Google, not a guess:

Say this to Claude right after you migrate "I just migrated [domain] from [old platform] to Astro/Cloudflare, keeping the same domain and URLs. Please pull the site's full historical URL list from the Wayback Machine's CDX API, check which of those old URLs currently 404 or soft-404 on the live site, and add proper 301 redirects for any that are missing — plus confirm there's a real custom 404 page. Then tell me honestly whether anything else looks off, and remind me that some ranking fluctuation in the first few weeks is expected, not a problem to fix."

After you launch: getting found, and what to monitor

Once your site is live, a short one-time setup gets you into search and gives you real visitor data. After that, it mostly looks after itself, there is almost no ongoing technical maintenance.

The one-time setup (do once per site)

The safeguard: ask Claude to re-audit everything, once the site is fully live

Two things make it easy for an SEO item to fall through the cracks, even when you followed this guide carefully:

Once your site is fully live — domain pointing, DNS settled, everything from this guide done — run one more pass. Paste this to Claude (with browser access, so it can actually check your live dashboards, not just your files):

📁 belinda — claude — 80×24
> Please do a full SEO safeguard check on this site, now that it's fully live. In the code: confirm canonical URLs, Open Graph/Twitter tags, JSON-LD structured data, an AI-friendly robots.txt, the sitemap integration, one H1 per page, unique meta titles/descriptions, and alt text on every image are all still in place. Then fetch the LIVE yourdomain/robots.txt and compare it line by line to the robots.txt file in the project — flag any extra "Disallow" lines for GPTBot, ClaudeBot, PerplexityBot, OAI-SearchBot, ChatGPT-User or Google-Extended that aren't in the project file, since that means Cloudflare's "Managed robots.txt" is overriding it. If you find that, check the live Cloudflare dashboard: AI Crawl Control → Signals → turn "Managed robots.txt" off, and AI Crawl Control → Security → confirm none of those crawlers have their "Block Crawler" switch on. Also confirm "Always Use HTTPS" is on under SSL/TLS. Tell me plainly what's missing or broken, don't just say everything's fine.

_
Worth repeating monthly, not just once Do this safeguard check right after go-live, then keep doing it every month for as long as the site is live. Run it sooner too after any big platform change you hear about (Cloudflare, GitHub, or Google announcing something new). It costs a few minutes and catches exactly the kind of silent, dashboard-only drift that no amount of careful coding prevents — the robots.txt override above is a real example of exactly this happening, on a real site built with this guide.

Set this up once so you never have to remember it

The easiest way to make sure this actually happens every month is to not rely on yourself remembering. Ask Claude to set it up as a recurring task, once, right now:

📁 belinda — claude — 80×24
> Please set up a recurring monthly check for this site, on the 1st of every month. Each time it runs: fetch the live yourdomain/robots.txt and compare it to the project's own robots.txt file, flagging any extra "Disallow" line for GPTBot, ClaudeBot, PerplexityBot, OAI-SearchBot, ChatGPT-User or Google-Extended that I didn't put there myself. Also confirm the site still loads, the sitemap is valid, and nothing obvious is broken. If something's wrong, tell me plainly what it is and what needs my approval to fix. If everything's fine, just send me a one-line "all good" so I know it actually ran.

_
If your version of Claude can't schedule recurring tasks Not every way of using Claude supports this (it depends on which app or plan you're on). If Claude says it can't set up a recurring schedule, that's fine — just put a monthly reminder in your own phone or calendar instead, titled something like "website safeguard check," and paste the same prompt above into a fresh Claude conversation when it goes off. The point is the same either way: don't rely on remembering this on your own, put something external in charge of reminding you.

Which dashboard tells you what

DashboardWhat it showsHow often to look
Cloudflare Web AnalyticsReal human visitors: visits, page views, top pages, where they came from. Your "is anyone actually coming?" view.Weekly. Look at 7 or 30-day windows, not single days.
Google Search Console (Performance)How you show up in Google: impressions, clicks, and the exact searches you appeared for. Your "is Google showing me, and for what?" view.Weekly
Bing Webmaster ToolsThe same idea as Search Console, for Bing and AI search.Occasionally
Host "web traffic" / total requestsEvery request INCLUDING bots and crawlers. Heavily inflated.Ignore this for judging your real audience.
Bots vs real people A host's big "traffic" number counts every bot and crawler that touches your site. A brand-new site can show thousands of "requests" but only a handful of real human visits. That is completely normal. Cloudflare Web Analytics shows the real humans; the gap between that and the big number is bots.

What you do NOT need to check or maintain

So there is no recurring technical chore. The only ongoing "work" is the good kind: publishing useful content, and glancing at your two dashboards (Web Analytics and Search Console) now and then to watch it grow.

Bottom line Migrating from Webflow to Astro will not hurt your SEO. In several measurable ways it will improve it. The biggest SEO win you can get is writing better content and making pages load faster — Astro on Cloudflare helps with the speed part automatically, and Claude Code can help you write the content.

Things you must NOT do

Do not move or delete your project folder from Desktop Your project lives at a specific path. If you move it, Terminal won't find it without you adjusting commands. If you must move it (e.g. to a Documents folder), commit and push everything to GitHub first as a backup.
Do not push secrets to GitHub Any API keys, passwords, or tokens go in a file called .env at the root of your project. Never paste them directly into the code or into Claude prompts that you'll commit.
Do not edit files directly inside the live site Every change goes through your project folder → git → GitHub → Cloudflare. Editing the live site directly isn't possible with this setup (which is a feature — it means everything is tracked).
Do not delete the node_modules folder unless you know what you're doing It contains the installed code Astro needs to run. If it gets corrupted, delete it and run npm install to rebuild it — but don't do this without a reason.
Do not cancel old hosting until the new site is fully working at your domain There's a period during DNS propagation where things might look broken. Wait until you've confirmed the new site works at your real domain before cancelling Webflow or wherever you came from.

Glossary

Astro
A static site builder. Turns your .astro files into plain HTML/CSS/JS that any browser can serve.
Branch
A parallel version of your code in Git. The default branch is usually called main. You can have separate branches for in-progress work that doesn't affect the live site.
Build
The process of turning your source files into final website files. Run with npm run build.
CLI
"Command Line Interface". Tools you control by typing commands instead of clicking. Terminal is a CLI.
Cloudflare Pages
A free hosting service. Connects to your GitHub repo and publishes your site automatically when you push changes.
Commit
A saved snapshot in Git. Each commit has a short message describing what changed.
Deploy
Putting your latest changes onto the live website.
DNS
"Domain Name System". The internet's address book. Maps your domain (yoursite.com) to a specific server.
Git
A version-tracking tool installed on your Mac. Records every change to your files.
GitHub
A website where your Git repositories live online. Backup and collaboration tool.
npm
"Node Package Manager". Installs and manages JavaScript libraries.
Node.js
A program that runs JavaScript outside the browser. Needed to run Astro on your laptop.
Push
Uploading your local Git commits to GitHub.
Repo / Repository
A Git project folder, usually one website or app.
Static site
A website made of pre-built files (no live database or backend). Cheap to host, very fast.
Tailwind CSS
A styling system using small utility classes. You define your brand colours once and use them by name everywhere.
Terminal
The text-based interface where you type commands. Built into macOS.