How to Start a Website (From Someone Who Had to Rebuild Hers)

1. The System Setup

When I started, I thought a “website” was one thing that lived in one place. It’s actually several separate jobs, and different companies can do each one.

My original site ran on WordPress with HostGator. It was the most common recommendation for personal sites: affordable, flexible, and full of themes and plugins. It felt like the correct decision at the time. But it came with a lot of moving parts, and I didn’t really understand what any of them were doing for me. When the site was hacked, I couldn’t even tell which part had failed. And don’t even get me started about all the plugin update emails I would get.

The four jobs, in plain language

Think of your website like a shop.

  • Domain — your shop’s address, like mywebsite.com. You don’t buy it forever. You rent it yearly.
  • Domain registrar — the office where you register and renew that address. Squarespace, GoDaddy, and Cloudflare are all registrars.
  • DNS (Domain Name System) — the directory that tells browsers which building your address points to. When you change hosts, you update the directory, not the address.
  • Hosting — the building where your website’s files actually live and get handed to visitors.
  • CDN (Content Delivery Network) — copies of your shop’s stock kept in warehouses around the world, so each visitor is served from the one closest to them. This is what makes a site load fast everywhere.

Understanding that these are separate is what let me design a cleaner system.

Four separate jobs get a website to a visitor. Someone types yourwebsite.com. The registrar confirms who owns the address, DNS looks up where the address points, the host stores your files and hands them out, and the CDN sends them from a server nearby. Hosting is invisible to visitors, but it decides how fast your site loads, how secure it is, and how easy it is to update.

My setup

My whole setup runs on two accounts. Cloudflare is one account doing four jobs: the registrar holds my domain, DNS points the domain, the host (Cloudflare Pages) serves the files, and the CDN delivers them fast. GitHub stores every version of my files. When I push a change to GitHub, Cloudflare Pages publishes it automatically.

I’m all about minimalism and simplicity, and I don’t like having lots of accounts to manage. Every extra account is another login, another bill, and another thing that can break. Cloudflare can do all four jobs, so I put my registrar, DNS, hosting, and CDN in one place.

Cloudflare

  • It publishes automatically whenever I push a change to GitHub.
  • It’s fast everywhere, because the CDN is built in.
  • HTTPS is included at no extra step.
  • It can create a private preview link for changes before they go live.
  • It connects directly to GitHub, so there’s no extra tool in between.
  • For a small personal site, the hosting costs me nothing. The domain costs around $10 a year, because Cloudflare sells domains at cost with no markup.

GitHub

Cloudflare covers the four jobs, but it doesn’t hold my original files. GitHub does. After losing my old site’s files in the hack, that mattered a lot to me.

  • Every version is saved. If a change breaks something, I can go back to any earlier version. Think of it as version history in Google Docs, but for a whole website.
  • My files live in two places. There’s a copy on my computer and a copy on GitHub, so one failure can’t wipe everything out.
  • It plugs straight into Cloudflare Pages. When I save a change and send it to GitHub (developers call this “pushing”), Cloudflare publishes the new version on its own.
  • It’s free for a personal site, and it’s so widely used that tutorials and AI tools know it well.

If you’re moving an existing site

Starting fresh? You can skip this part.

  1. Transferring the domain from HostGator to Cloudflare, so my address lived with my directory.
  2. Deleting old DNS records that still pointed to my old WordPress website. Leftover records are like old forwarding addresses at the post office. They send visitors to places that no longer exist, or conflict with the new ones. This was the hardest part, because it meant understanding DNS records. The two you’ll hear about most are A records and CNAME records. An A record points your domain to a specific numeric address, like a street number. A CNAME record points your domain to another name, like saying “same place as that shop over there.” Most hosts tell you exactly which one to add, and what to put in it.
  3. Connecting GitHub to Cloudflare Pages, so the host knows where to get my files.
  4. Setting up records for both versions of my address, with and without www, so either one works.
  5. Checking the padlock (SSL/HTTPS) on both versions, to confirm the connection was secure.

2. Your design will look different on every screen, and that’s okay

I designed my website in Figma before writing any code. When I started building the homepage, things looked wrong in the browser. I would click an element in Figma, note its size (say, 70 by 70 pixels), and type that into my code. But everything came out smaller in the browser than in my design.

Nothing was broken. I just didn’t understand what a pixel was. Going back to the basics fixed it.

Understanding the basics

Screen size is physical. It’s how big the monitor is, like measuring a piece of paper with a ruler.

Resolution is how many tiny dots (pixels) fit on that screen. It has nothing to do with the screen’s physical size. A small 13-inch laptop and a huge 27-inch monitor can both be split into the same 1920 × 1080 grid. The laptop just packs smaller dots into less space.

Scaling is where it gets interesting. Many modern screens have far more real pixels than they actually use to draw things. A 4K screen has 3,840 pixels across. If a website used every one of them at a 1:1 ratio, the text and buttons would be microscopic.

So your computer quietly pretends to have fewer pixels. It might say, “I have 3,840 real dots, but I’ll act like I have 1,920, and make each pretend pixel two real ones wide.” That’s scaling. From the pixel-count side, it reduces the number. From the visual side, it makes everything bigger. It’s the same thing as zooming in.

Viewport width is how wide your browser window is, measured after scaling. It’s the only width your website ever sees. Your code never touches the screen’s real resolution, so when you design, the viewport width is the number that matters.

A screen’s label doesn’t tell you its viewport width. Very different screens can report the same width, and identical screens can report different ones:

  • A 4K screen (3,840 pixels across) at 200% scaling reports 1,920 pixels (3,840 ÷ 2).
  • A 1920 × 1080 screen at 100% scaling also reports 1,920 pixels (1,920 ÷ 1).
  • A 1920 × 1080 screen at 125% scaling reports only 1,536 pixels (1,920 ÷ 1.25).

Why I picked 1,920 as my frame size

Once I understood viewport width, the next question was which width to design for.

I designed on a 1,920-pixel-wide artboard because 1920 × 1080 is the most commonly reported desktop resolution. I assumed most of those people also used 100% scaling, so their viewport would be 1,920 too.

That’s not reliably true. Real visitors show up at widths all over the place, like 1,400, 1,536, 1,920, or 2,400, depending on their screen and their settings. I can’t control or predict that.

I still use 1,920, for three reasons:

  1. I need a fixed reference point. Figma can’t draw at every width at once, so I have to pick one. I could have used my own laptop’s width, but that would design for an audience of one: me.
  2. It’s close enough most of the time. Plenty of visitors really are near 1,920.
  3. The number matters less than what I build around it. No single number will match every visitor. The real fix is making the site adjust gracefully when the real width is different.

Where does my content lie in the frame

Picture your content sitting on a sheet of paper in the middle of the screen, with a margin on each side. In my Figma design, that sheet is 1,679 pixels wide: the 1,920-pixel artboard minus 121 pixels of margin on the left and 120 on the right.

The question is what that sheet should do when a visitor’s screen isn’t 1,920 pixels wide. I gave it two rules:

  • On a bigger screen, stop growing at 1,679. Otherwise, lines of text get so long they’re tiring to read. The extra space just becomes wider margins.
  • On a smaller screen, shrink to fit, but keep a small margin. The sheet always leaves at least 24 pixels at each edge (16 on phones), so nothing touches the edge of the screen.

In code, both rules fit in one line. You don’t need to understand this to follow along, but here it is:

.website-frame {
  width: min(var(--website-frame-width), 100% - (var(--gutter) * 2));
  margin-inline: auto;
}

min() means “use whichever is smaller.” The two options are 1,679 pixels, or the screen’s width minus a margin on each side. On a big screen, 1,679 is smaller, so the sheet stops growing. On a small screen, the screen’s width is smaller, so the sheet shrinks. margin-inline: auto keeps the sheet centered.

Responsive design

A narrower sheet isn’t enough for tablets and phones, though. A row of three side-by-side boxes won’t fit on a phone, so it needs to stack into a single column. I designed those layouts separately and told the site to switch to them below certain widths: 900 pixels for tablets and 600 for phones. Those switching points are called breakpoints.

Lesson:

Even on Squarespace, Wix, or Framer, the same thing applies. Your visitors won’t see your site exactly as you see it.

  • Compare at the same width before deciding something’s broken. Your design is drawn at one width, and your visitors’ browsers are a different width. Check your design tool at 100% zoom, and check your display scaling setting.
  • Check your site on a phone, a laptop, and a large monitor before you share it.
  • Design responsively. Use your builder’s mobile preview, and design the mobile version on purpose instead of hoping it adapts.

3. Use of AI

AI works best as an advisor, not an autopilot. A little here and there is great for thought exercises, research, mockups, and ideating. But humans are the ones who bring it to life.

I’ve tried to learn to code many times, and it never stuck. So for this rebuild, I turned to AI, and I used it throughout.

What I needed from AI

I’d already planned the structure of my site. But building it still meant writing a lot of HTML and CSS across many pages and projects. As someone working between product, design, and content, I didn’t want to type every line by hand. I wanted to work efficiently without losing clarity or control.

So I went looking for an AI tool that could do two things:

  1. Turn a design into code. I wanted to upload a screenshot, a wireframe, or a Figma export and get usable HTML and CSS back.
  2. Make changes across my site, but never without my review. Some updates, like the navigation, needed to apply to every page. But I didn’t want any tool rewriting my whole site on its own. That’s how layouts drift, code gets repeated, and pages break.

Finding the right AI tool

I tested several tools before settling on a workflow:

  • Replit combined editing, previewing, and AI in one place. But its best AI features cost extra, and it favored generating code quickly over fitting my site’s structure.
  • Uizard helped me explore layouts visually early on, but I didn’t use its output as real code.
  • GitHub Copilot works inside a code editor and suggests changes based on the files around it. It was good for repetitive work.
  • ChatGPT and Claude were most useful as thinking partners: planning structure, explaining trade-offs, and reviewing a change before I made it.
  • Claude Code runs on my own computer and works directly with my site’s files. It can read the whole project, explain what’s there, and make changes once I approve them. This is the one I stuck with for building the site.

Set rules first

Out of the box, AI tends to rewrite whole files when you only need one line changed, suggest tools you don’t need, and forget how your site is organized. So instead of using it generically, I gave it written instructions specific to my website. They work for anyone starting out:

  • Set boundaries upfront. Tell it what tools you’re using and what it shouldn’t touch: no new tools, no reorganizing folders, and no rewriting whole files unless you ask.
  • Keep changes small. Ask for one change at a time, with the exact file, the exact text to find, and the exact text to replace it with.
  • Understand before you accept. If you don’t know what a change does, ask it to explain first.
  • Preview before it goes live. Check every change in your browser before publishing.
  • Keep version history. Save each change with a short note, so you can always see what changed and undo it.

Nothing changes on my site without my approval. AI suggests, and I decide.

Let AI tell you what you’re missing

A website needs more than its pages. There are small behind-the-scenes files that most beginners, including me, don’t know exist. You can’t ask for something you’ve never heard of.

AI helped me figure out which files a finished site should have. They’re called root-level files, because they sit at the top level of your project folder. Instead of holding one page’s content, they shape how the whole site behaves.

FileWhat it doesWhy it matters
Homepage (index.html)The first page visitors see at your main address.Without it, your domain has nothing to show.
404 pageWhat visitors see when a link is broken or a page doesn’t exist.A friendly page with a way back beats a blank browser error.
FaviconThe tiny icon in the browser tab next to your site’s name.It makes your site easy to spot among open tabs and bookmarks.
Social preview imageThe picture, title, and description that show up when someone shares your link.Your site makes a good first impression in texts and social posts, instead of a blank or random preview.
robots.txtA short note telling search engines which pages they can look at.It helps shape what shows up in search results.
READMEA note explaining what the site is and how it’s organized.Future you, or anyone helping you, can find their way around.

Once those were in place, I asked AI what else should sit at the root. It suggested two more:

  • _headers sends instructions along with every page, like security settings. It adds protection visitors never see.
  • _redirects sends old links to new pages. If you rename or move a page, old links keep working.

These two are specific to hosts like Cloudflare Pages. Other hosts handle the same settings their own way.

This is where AI is most useful for beginners. It doesn’t have to write everything for you. It can tell you what you don’t know you’re missing. Try asking: “What does a finished website usually include that I might be forgetting?”

4. “I’m overwhelmed. Why not just use Framer or Squarespace?”

That’s a fair question. If you need a site live this week, a builder is a good answer. It can get you a good-looking site in hours with no setup. Here’s how it went for me, and how to decide for yourself.

My initial journey

My first goal after the hack was simply to get back online, fast. I picked Framer, a visual site builder, mostly because I kept seeing ads for it. I still needed somewhere to register my domain, and ChatGPT told me Squarespace was the best option. So I ended up with my site on one platform and my address on another.

It worked as an emergency fix. But as I kept working, I ran into the trade-offs anyone using a builder will face:

  • Cost. Builders charge a monthly subscription, and it adds up every year. My coded site costs me only the domain.
  • Design limits. My custom project pages from Figma didn’t fit any template. I’d already fought a page-builder plugin on WordPress, and Framer still couldn’t get there.
  • Ownership. My site lived inside Framer’s system, so leaving meant rebuilding. Now I have my own files and can move hosts anytime.
  • Dependencies. Every platform, plugin, and integration can raise its price, break, or get hacked. I wanted as few of those as possible.

Builder or coded site?

QuestionWebsite builder (Framer, Wix, Squarespace)Coded site (what I built)
Time to launchHours to daysWeeks, if you’re learning as you go
CostMonthly subscriptionDomain only for a small site, about $10 a year
Design freedomWhatever the builder supportsAnything you can build
Owning your filesOften limited; leaving usually means rebuildingFull; move hosts anytime
Skills neededNoneBasic HTML and CSS, or AI with rules

A builder is the right choice if you need something live quickly, your pages are fairly standard (a portfolio grid, an about page, a contact form), and you’d rather not learn code. A coded site is worth it if your design goes beyond templates, you want to own your work outright, or you want the lowest long-term cost.

There’s also a middle path, and it’s what I’d tell most people. Start on a builder, but register your domain separately and keep copies of all your content outside it. You get speed now, and you can move later without losing anything. Without realizing it, that’s what I did with Framer and Squarespace. And keeping my content outside the platform is what saved me after the hack.

So where should you start?

If you’re starting a website today, here’s what I’d do, in order:

  1. Decide what the site is for. Write down who it’s for and list the pages you need. When I rebuilt, I defined each page’s purpose before choosing any tools, and it made every later decision easier.
  2. Register your domain separately. Keep it in your own name and turn on auto-renew. Then you can switch builders later without losing your address.
  3. Pick a tool that fits how much you want to learn. If you don’t want to touch code, Squarespace, Wix, or Framer work well. If you want full ownership, a simple coded site on a host like Cloudflare Pages costs less and has fewer things that can break.
  4. Keep your own copies of everything. Save your designs, text, and images outside the platform. It’s the only reason I didn’t lose everything.
  5. Check for the padlock. Your address should start with https://. Most hosts turn this on for you.
  6. Test on three screens before sharing: a phone, a laptop, and a large monitor if you can.
  7. If you use AI, set rules first. Small changes, explained clearly, previewed before they go live.

The thread through all of it

Each of these lessons came down to the same thing. I had to understand a layer myself before I could trust any tool to handle it for me.

When I didn’t understand hosting, a hack took my whole site. When I didn’t understand pixels, my design and my browser didn’t match, and I couldn’t tell why. When I let AI work without rules, it ran wild. Once I understood each piece, the tools became much more useful, because I knew what to ask them for.

You don’t need to become a developer to have a website you own. You just need to know enough to make the decisions yourself.

Quick glossary

TermWhat it means
DomainYour site’s address, like mywebsite.com. Rented yearly.
RegistrarThe company you rent your domain from.
DNSThe directory that connects your domain to where your site lives.
A recordA DNS entry that points your domain to a numeric address.
CNAME recordA DNS entry that points your domain to another name.
HostingWhere your website’s files live and get served to visitors.
CDNCopies of your site stored worldwide, so it loads fast everywhere.
HTTPS / SSLThe secure connection behind the padlock in your browser.
GitHubA service that stores your site’s files and every past version of them.
PushSending your saved changes to GitHub.
DeployPublishing a new version of your site so visitors see it.
BranchA separate copy of your site for testing changes safely.
Static siteA site made of plain files, with no database or plugins running behind it.
Viewport widthHow wide the browser window is, in the pixels your website actually sees.
ScalingYour computer’s setting that enlarges everything on screen.
BreakpointA width where your site switches to a different layout, like tablet or phone.