Infrastructure fundamentals
Hosting
Hosting is the service that stores your website files and delivers them to visitors over the internet.
Why marketers should care
Publishing a website is part of bringing a digital product to market. Understanding hosting helps marketers work more effectively with developers, diagnose launch problems, and understand what happens between approving a change and seeing it live.
It also helps separate concepts that are often incorrectly treated as the same thing:
- Writing the website
- Tracking changes to the website
- Deploying the website
- Hosting the website
- Giving the website a domain name
What hosting is
A website is made from files such as HTML, CSS, JavaScript, images, and fonts. Those files must be stored on a computer that can respond when someone visits the website.
A hosting provider operates those computers and makes the website available through the internet.
- It stores the website files.
- It serves those files when a browser requests them.
The building analogy
Imagine that a website is a business operating inside a building.
Website
The business itself: its products, signs, furniture, content, and customer experience.
Hosting
The building where the business operates.
Domain
The public street address that tells visitors where to find the business.
Browser
The visitor arriving at the address and viewing what is inside.
A website can move from one hosting provider to another, just as a business can move from one building to another.
The website can stay the same while the building changes. If the domain is updated to point to the new host, visitors may never notice the move.
Browser
↓
Domain
↓
Hosting
↓
Website files
↓
Rendered page
What deployment means
Hosting describes where the live website is stored and served. Deployment describes the process of updating that live website.
When you change an HTML file in GitHub, the live website does not automatically know about that change unless a deployment process publishes the new version.
Using the storefront analogy, deployment is putting the newest version of the store on display so visitors see the latest changes.
Git, deployment, and hosting
Git, GitHub, deployment, and hosting have related but different responsibilities.
Write website files
↓
Git tracks changes
↓
GitHub stores the repository
↓
Deployment publishes the latest version
↓
Hosting serves the website
↓
Visitors open it in a browser
- Git tracks changes to files over time.
- GitHub stores the Git repository and supports collaboration.
- Deployment publishes a selected version of the website.
- Hosting stores and serves the published website.
The production branch
A production branch is the Git branch that represents the version intended for the live website.
For Marketer Lab, Cloudflare is configured to deploy the
main branch.
Feature branch
↓
Make and test changes
↓
Open a pull request
↓
Review the change
↓
Merge into main
↓
Cloudflare deploys
↓
Visitors see the new version
The branch is not automatically a production branch simply
because it is named main. It becomes the
production branch because the hosting provider is configured
to deploy it.
What a build does
Browsers understand HTML, CSS, and JavaScript. If a project already contains browser-ready files, the hosting provider can publish them directly.
Marketer Lab currently uses plain HTML, so there is no transformation step.
Finished HTML files
↓
Deployment
↓
Hosting
Some projects are written using tools or languages that browsers cannot use directly. Those projects need a build step that transforms the source files into browser-ready files.
Source files
↓
Build process
↓
HTML, CSS, and JavaScript
↓
Deployment
↓
Hosting
Examples of tools that may introduce a build step include:
- TypeScript
- Sass
- React
- Hugo
- Jekyll
- Next.js
Animations do not automatically require a build. An animation written in ordinary CSS or JavaScript is already understood by the browser.
Why Marketer Lab uses exit 0
Cloudflare allows projects to run a command before publishing the website. This is normally where a project would perform its build.
Marketer Lab does not currently need a build. The command below finishes successfully without transforming any files:
exit 0
The 0 is a success status. It tells the system
that the command completed successfully.
The build output directory
A repository may contain files that should not become part of the public website.
Repository
├── README.md
├── LICENSE
├── project-notes/
└── website/
├── index.html
├── learning-path.html
└── hosting.html
Marketer Lab tells Cloudflare to publish only:
website
This folder is the build output directory. It identifies the files that belong to the public website.
A README update or a new internal project note can remain in the repository without appearing on the website, provided it is stored outside the published directory.
Types of hosting
Static hosting
Static hosting serves files that have already been created. It is a good fit for documentation sites, portfolios, landing pages, and sites built primarily with HTML, CSS, and JavaScript.
Marketer Lab is currently a static website.
Application hosting
Application hosting runs software on a server. The server may generate content, process forms, manage user sessions, or communicate with a database.
Cloud infrastructure
Cloud infrastructure provides lower-level computing resources such as servers, storage, databases, and networks. It offers greater control, but also introduces more decisions and operational responsibility.
Choosing a hosting provider
There is no universally best hosting provider. The right choice depends on the requirements of the project.
Useful questions include:
- Is the website static or dynamic?
- Is the source repository public or private?
- Does the project require a build step?
- Does it need preview deployments?
- Will it need server-side code?
- How much configuration should the team manage?
- What level of traffic does the project expect?
| Provider type | Often useful for | Trade-off |
|---|---|---|
| GitHub Pages | Simple static websites closely connected to a GitHub repository | Fewer application and infrastructure features |
| Cloudflare Pages | Static websites, Git-based deployments, and projects using the broader Cloudflare platform | The platform includes concepts beyond basic hosting |
| Netlify | Frontend projects, static sites, previews, and simple Git-based deployment workflows | More platform features than a basic static site may need |
| Vercel | Frontend applications and projects built with modern web frameworks | Its strongest benefits may not matter for plain HTML |
| AWS, Azure, or Google Cloud | Complex applications requiring detailed control over infrastructure | More configuration, complexity, and operational work |
Why Marketer Lab uses Cloudflare Pages
Marketer Lab is currently a static website stored in a GitHub repository. It does not need a server, database, or complex build process.
Cloudflare Pages supports the workflow the project needs:
- Connect to the GitHub repository.
- Watch the
mainbranch. - Publish the contents of the
websitefolder. - Deploy again when new changes are merged.
This is a suitable choice for the project today. It does not mean Cloudflare is the best host for every website or that Marketer Lab must use it forever.
A successful deployment can still publish a broken website
A hosting provider can successfully copy and publish every file even when the website contains:
- Broken links
- Missing pages
- Incorrect text
- Layout problems
- JavaScript errors
Deployment
✓ Files published successfully
Website
✗ Some links lead to missing pages
The hosting provider confirms that the deployment process worked. It does not understand whether the visitor experience is correct.
After a deployment, the website should be tested as a visitor would use it.
Common hosting vocabulary
- Server
- A computer or program that responds to requests from other computers.
- Client
- The browser or application making a request to a server.
- Production
- The live environment used by real visitors.
- Deployment
- The process of publishing a selected version of a website or application.
- Build
- A process that transforms source files into files that can be published or executed.
- Build output directory
- The folder containing the finished files that should be published.
- Static website
- A website served mainly as pre-created HTML, CSS, JavaScript, and asset files.
- CDN
- A network of servers that can deliver files from locations closer to visitors.
- Uptime
- The amount of time a service remains available and operational.
Try it yourself
Make a small, visible change to Marketer Lab and follow the complete publishing workflow.
- Create a feature branch.
- Edit one sentence in an HTML file.
- Preview or review the change.
- Commit the change.
- Open a pull request.
- Merge the pull request into
main. - Wait for Cloudflare to deploy the new version.
- Open the live website.
- Confirm that the change appears.
- Test the page links and navigation.
The important lesson is not the exact sequence of buttons in one hosting dashboard. It is the relationship between the repository, production branch, deployment, host, and live website.
The bigger picture
Marketer Lab currently has a simple architecture:
HTML files
↓
Git repository
↓
GitHub
↓
Cloudflare deployment
↓
Cloudflare hosting
↓
Visitor's browser
Future projects may add a build system, application server, database, authentication, or cloud infrastructure. Those additions will make the architecture more complex.
They should only be added when the product actually requires them.
Key takeaways
- Hosting stores and serves website files.
- Deployment updates the live website with a selected version.
- Git tracks changes, while hosting serves the published result.
- The production branch is the branch the hosting provider is configured to deploy.
- A build transforms source files when they are not already browser-ready.
- The build output directory controls which files are published.
- A successful deployment does not guarantee that the website works correctly.
- The right hosting provider depends on the needs of the project.