How a Modern Business Website Works, From Code to Customer
What really happens when a customer opens your website: domains, Cloudflare, HTML, CSS, JavaScript, Astro, databases and forms, explained in plain English.
A customer taps a link to your website. Less than a second later, your page is on their screen. In that moment, a surprising amount happens: a global network finds your site, a server hands over files, and a browser turns code into the page your customer sees.
You don’t need to know any of this to run a business. But understanding the basics makes it much easier to tell a well-built website from one that only looks good in a screenshot. Here is how a modern business website works, step by step, and how we wire one together at WebsiteTek.
How we got here: a short history of the web
The web is younger than most of the businesses reading this. In a little over three decades it went from a few linked documents at a physics lab to the place where most customers first meet a business. These are the milestones that shaped how websites are built today:
- 1989: Tim Berners-Lee, a scientist at CERN in Switzerland, proposes a system of linked documents: the World Wide Web.
- 1991: The first website goes online, written in a brand-new language called HTML (HyperText Markup Language).
- 1993: The Mosaic browser shows pictures and text together on the same page, and the public starts to notice the web.
- 1994: Netscape Navigator arrives, and the World Wide Web Consortium (W3C) is founded to set web standards.
- 1995: JavaScript is created at Netscape, famously in about ten days, and PHP appears for building pages on the server.
- 1996: CSS becomes a web standard, separating design from content for the first time.
- 1998: Google is founded, and search becomes the front door to the web.
- 2003: WordPress is released and makes publishing a website possible without writing code.
- 2005: The term Ajax is coined for pages that update without reloading, the trick behind Gmail and Google Maps.
- 2006: jQuery makes JavaScript far easier to write across different browsers.
- 2007: The iPhone puts the real web in people’s pockets, and the mobile web era begins.
- 2008: Google Chrome launches, with a much faster JavaScript engine.
- 2010: Designer Ethan Marcotte names responsive web design: one website that adapts to every screen size.
- 2011: Google, Bing and Yahoo launch Schema.org, a shared vocabulary for describing businesses and content to search engines.
- 2012: Microsoft releases TypeScript, adding type checking to JavaScript.
- 2013: Facebook releases React, which changes how interactive interfaces are built.
- 2014: HTML5 becomes an official W3C standard, with built-in video, audio and meaningful page structure.
- 2015: Let’s Encrypt begins offering free security certificates, and HTTPS starts becoming the norm.
- 2017: CSS Grid reaches all major browsers, finally giving designers true two-dimensional layouts.
- 2018: Chrome starts labeling sites without HTTPS as “Not secure”.
- 2019: Google turns on mobile-first indexing for new websites: the phone version of a site is now the one that counts.
- 2020: Google introduces Core Web Vitals, measuring how fast and stable a page feels to real visitors.
- 2022: Astro 1.0 is released, bringing back fast, mostly pre-built pages with interactive “islands”. The same year, ChatGPT launches and AI assistants begin answering questions people used to search for.
- 2024: The llms.txt proposal suggests a simple file that helps AI tools understand a website.
Every step on that list is still visible in a modern website. HTML is still the foundation, CSS still does the design, JavaScript still adds the behavior, and each new idea, from responsive design to structured data, made websites faster, safer and easier to find. Here is how those pieces fit together today.
Step 1: The address book of the internet (DNS)
Your domain name, such as yourbusiness.com, is just a friendly label. Computers find each other by numbers, so the first thing a browser does is ask the Domain Name System (DNS) where your website lives.
Think of DNS as the internet’s address book. The same records also tell the world which servers handle your email, and they hold the SPF, DKIM and DMARC entries that stop scammers from sending email in your name. Getting DNS right is quiet, invisible work, and it matters for both your website and your inbox.
Step 2: A guard at the front door (Cloudflare)
On the websites we build, the visitor doesn’t go straight to your server. They meet Cloudflare first: a global network with data centers around the world.
Cloudflare does three jobs at once:
- Speed. It keeps copies of your images, styles and scripts close to your visitors, so they load from nearby instead of from across the country.
- Security. It turns away known attackers, bad bots and floods of fake traffic before they reach your site.
- Encryption. It makes sure every connection uses HTTPS, the padlock in the address bar.
We then lock the server itself so it only accepts traffic that comes through Cloudflare. A guard is only useful if nobody can walk around him.
Step 3: The page itself (HTML, CSS and JavaScript)
Every web page, from the simplest to the most complex, is built from three languages that work as a team:
- HTML5 is the structure: headings, paragraphs, lists, images, buttons and forms. Good HTML is semantic, which means each part is labeled for what it really is. That helps Google understand your page and lets screen readers guide visitors with low vision.
- CSS3 is the design: colors, fonts, spacing and layout. Modern CSS layout tools, Grid and Flexbox, let one page rearrange itself gracefully from a phone to a wide computer screen. We use Tailwind CSS to keep the styling consistent and your brand colors in one place.
- JavaScript is the behavior: menus that open, forms that check what you typed, calculators, maps and animations. We write it in TypeScript, which adds type checking and catches many mistakes before a visitor ever sees them.
Step 4: Building pages before anyone asks (Astro)
Many websites build each page from scratch every time someone visits, by pulling content out of a database and assembling it on the fly. That takes time, and it gives attackers more moving parts to aim at.
We use a framework called Astro, which takes a different approach. It builds every page ahead of time into plain, finished HTML. When a visitor arrives, the page is already done and simply handed over. It’s like the difference between cooking a meal to order and having it plated and ready when the guest sits down.
Astro also follows an idea called islands. Most of a page is static, so it ships with no JavaScript at all. Only the parts that really need to be interactive, such as a quote calculator or a customer dashboard, load code, and those are written in React. The result is a page that feels instant on a normal phone connection.
Step 5: When your website needs to remember something (databases and server functions)
A brochure website can live entirely on pre-built pages. But the moment you want a contact form, online orders, customer accounts or a booking request, your website needs a place to store information safely and a way to act on it.
Here’s how that’s wired:
- A visitor fills in a form. A quick, invisible check confirms they are a person, not a spam bot.
- The form sends its data to a small server function: a short program that runs on a secure server, never in the visitor’s browser. That’s where secret keys live, so they can never be copied out of your website’s code.
- The function checks every field again (never trust what a browser sends), then saves the request in a PostgreSQL database using SQL.
- The database is protected by row-level security: rules inside the database that decide who may read or change each row. A customer signed in to their portal sees only their own projects and invoices, even if someone tries to trick the website.
- Finally, the function sends the emails: a note to your team and a friendly confirmation to the customer.
This is the same pattern we use on our own website for quotes, orders, customer portals and our free tools, and it is the pattern we follow for clients who need forms, logins or dashboards.
Step 6: Making sure people (and machines) can find it
A fast, secure website still has to be found. Behind the scenes, each page carries:
- A clear title and description for search results
- Structured data (JSON-LD), a small block of code that tells Google your business name, services, service areas and answers to common questions in a format it reads directly
- A sitemap that lists every page, so search engines don’t miss any
- An llms.txt file, a plain summary that helps AI assistants describe your business correctly
Images are resized for each screen and saved in the modern WebP format, so they look sharp without slowing the page down.
Step 7: Checking every page, not just the home page
Code that works on a developer’s computer can still break on a real phone. Before launch, and after every update, we check the whole website:
- Every page at phone and computer widths
- Color contrast on every piece of text
- Broken links, missing images and script errors
- Google’s Lighthouse scores for speed, accessibility, best practices and SEO
- Security headers and HTTPS
Only when all of that passes, and you have approved every page, does the website go live.
The frame of mind behind it
Good engineering on a business website comes down to a few habits: build only what the page needs, keep secrets on the server, check everything a visitor sends, test on real screen sizes, and make it easy for both people and search engines to understand. Those habits are why a hand-built site can stay fast and secure for years.
Want to see the full list of tools and languages we use? Read how we build websites. If you’d like a website built this way for your business, ask for a free quote or compare our prices.








