A static website is a set of ready-made pages that look the same for every visitor.
This guide is for small business owners, students and anyone thinking about a simple website. You do not need to code to benefit: if someone builds your site, knowing what makes static sites safer helps you ask the right questions.
In short
- A static site has no login page for visitors and no database behind it, so there are fewer ways to break in.
- Fewer ways in is not zero. The accounts that control the site, its address and its files still need care.
- Old web addresses left pointing at a removed site can be claimed by someone else.
- Turn on HTTPS, use strong sign-in on every account and load as few outside scripts as you can.
What you will learn
- Explain what a static website is in one sentence.
- Spot the risks a static site removes and the ones it keeps.
- Check the accounts that control your site.
- Ask your web builder the right security questions.
- Ready-made website (static site)
- a site made of finished files that the host sends unchanged to each visitor.
- Site maker (static site generator)
- a tool that turns text and pictures into finished web pages before they go online.
- Web host
- the company whose computers store your site and send it to visitors.
What is a static website?
Think of a printed leaflet compared with a shop counter. The leaflet is finished before anyone picks it up, and every reader gets the same copy.
A static website works like the leaflet. Its pages are made in advance and stored as finished files. When you visit, the web host simply sends you a copy.
Many other sites work like the shop counter. A program runs each time you visit, often talking to a database (an organised store of information, such as orders or user accounts). Popular tools for these sites, like WordPress, work this way.
Static sites are often made with a static site generator. This is a tool that turns text and pictures into finished pages before they go online.
Where the comparison stops working: a printed leaflet cannot change once it is out. A static site can be changed by anyone who gets into the accounts that publish it.
Why does it matter?
Every moving part on a website is a possible way in. A static site has fewer moving parts on the live server, so there is less to patch and less to attack. The risk moves to the accounts and services around the site.
If you run a small business
What could happen: someone signs in to your hosting or domain account and swaps your pages for their own.
Check this: turn on a second sign-in step for your host and your domain account.
If you are learning web development
What could happen: a test key or password ends up in the files you publish, where anyone can read it.
Check this: look through the finished files before you publish them.
If you look after a marketing site
What could happen: a script added for chat or tracking is changed by its maker and runs on your pages.
Check this: list every outside script your site loads, and remove the ones you no longer use.
What does it look like?
Here is a made-up list of what one small static site depends on. Each line is something an attacker could aim at.
Example only. All values are made up.
Site: www.example.com (static, FAKE inventory)
Domain account registrar login, no second step (1)
Web host publishes from a shared code project (2)
Old address shop.example.com still points to a
removed host (3)
Outside scripts chat-widget.example.invalid (4)
Contact form handled by a form service, key 0000 (5)
- Whoever controls the domain account can point your address anywhere.
- Anyone who can change the code project can change what visitors see.
- This line shows a forgotten address that someone else might claim.
- An outside script runs with the same power as your own pages.
- Forms need a service behind them, and that service has its own settings and keys.
Why this is risky: the pages are simple, but five separate accounts and services can still change what visitors see.
The safer way: protect each account with a strong password and a second sign-in step. Remove old addresses you no longer use, and keep outside scripts to the few you really need.
How does it work?
A static site usually goes from a laptop to the web in a few simple steps, and each step is a place to protect.
- Write. Someone writes the pages and adds pictures on their own computer, often in plain text files.
- Build. A site maker turns them into finished files. Some hosts run this step for you.[1]
- Upload. The files go to the host, often from a shared code project. The published site can be public even if that project is private.[2]
- Serve. The host sends the same files to every visitor. HTTPS, the padlock in the browser, scrambles the traffic so others cannot easily read or change it on the way.[2]
- Guard. Keep every account in the chain locked down, because each one can change what visitors see.

Some risks stay even on a static site. Say you delete a site but leave its address set up. Someone else may then be able to claim that address and put their own pages there. This is called a subdomain takeover. GitHub, one popular host, lets owners verify their domain to lower this risk.[3]
Outside scripts are another risk. A browser feature called a Content Security Policy lets a site list the places scripts may load from. It mainly helps against attacks that sneak harmful code into a page.[4]

A worked example
Yara Zamora owns Thistle Joinery, a fictional workshop that makes kitchen cabinets. Her old website ran on a popular blogging tool. Twice last year it was hacked through an out-of-date plugin, which is an add-on that gives a site extra features.
Her nephew, Tomas Nakamura, is studying web design. He offers to rebuild the site as a static site. It only needs a few pages, some photos and a contact form.
Yara thinks of the printed leaflet. There is no shop counter for a stranger to lean over. But she asks Tomas who could still change the leaflet before it reaches people.
Tomas makes a list. There is the domain account, the hosting account and the shared code project. There is also the form service and one chat script.
He turns on a second sign-in step for all three accounts. He switches on the host's setting to always use HTTPS. He also notices that the old blog address still points at a host they no longer pay for. He removes that record, so nobody else can claim it.
The chat script is rarely used, so Yara agrees to drop it. Visitors can use the contact form instead.
Before the launch, Tomas checks the finished files for passwords or keys. He finds a test key for the form service and replaces it with a new one stored in the form service's own settings.
Six months on, the site has needed far less upkeep. Yara still reviews the account list every spring.
Myths and mistakes
| What people think | What is true |
|---|---|
| Static sites cannot be hacked. | They have fewer ways in, but the accounts that publish them can still be taken over. |
| A private code project keeps the site private. | The published site can be public even when the project behind it is private.[2] |
| HTTPS is only for shops. | HTTPS helps stop others reading or changing any page on the way to the visitor.[2] |
| Deleting the site removes the risk. | An address left pointing at the old host may be claimed by someone else. Remove the record too.[3] |
| A static site is a good place for a password-protected area. | A plain static host is not built for passwords or card numbers. Use a service made for that.[2] |
What can I do this week?
- List every account that can change your site: domain, host, code project and form service.
- Turn on a second sign-in step for each of them.
- Switch on the host's "always use HTTPS" setting, if it has one.
- Ask your web builder to remove any old addresses that point at hosts you no longer use.
- Remove outside scripts you no longer need.
Checklist
- Every account that can change the site has a strong password and a second sign-in step.
- Only the people who need it can publish changes.
- The site always loads over HTTPS.
- No old web addresses point at hosts or services you no longer use.
- Your domain is verified with your host, where the host offers it.
- The published files hold no passwords, keys or private notes.
- Outside scripts are kept to a short, known list.
- Forms send their data to a service you trust and have checked.
Common questions
Are static websites more secure than WordPress?
Usually there is less to attack on the live server, because there is no visitor login, database or plugin code running for each visit. That does not make them safe on their own. The domain, hosting and publishing accounts still need strong protection.
Can a static site have a contact form?
Yes, but the form needs a service behind it to receive messages. That might be your host or a separate form service. Treat that service as part of your site: protect its account and check where the messages are stored.
Do I still need HTTPS on a static site?
Yes. HTTPS scrambles the traffic between your site and each visitor, so others cannot easily read or change pages on the way. Many hosts offer it at no extra cost, and some let you force every visit to use it.
Can I put private pages on a static site?
Not safely on a plain static host. The files are sent to whoever asks for them, and hiding a page is not the same as protecting it. GitHub, for example, says its static hosting should not be used for passwords or card numbers.
What happens to my web address if I close the site?
The address can keep pointing at the old host until you change it. Someone else might then claim that space and show their own pages under your name. When you close a site, also remove or update the address record with your domain provider.
Where next?
Ready for the detail? Read the practitioner guide: Small Business Website Security Guide. It goes further into hosting choices, account protection and the checks a small firm can run on its own site.
Also useful:
- Website Security for Beginners
- Subdomain Takeover for Beginners
- Content Security Policy Guide
- Content Delivery Networks (CDNs) for Beginners
Related NHI Mgmt Group resources: Security Headers Guide · Small Business Domain and Website Ownership Guide · Website Defacement for Beginners
Key terms
- Static site
- A website made of finished files that the host sends unchanged to every visitor.
- Static site generator
- A tool that turns text, templates and pictures into finished web pages before they are published.
- HTTPS
- The secure version of the web's main language, which scrambles traffic and checks you reached the real site.
- Subdomain takeover
- When someone claims a service behind a forgotten web address and serves their own content on it.
- Dangling DNS
- An address record that still points to a removed or unclaimed host or service.
- Content Security Policy
- A browser rule set by a website that limits where scripts and other files may load from.
- Third-party script
- Code loaded from another company's site that runs inside your pages.
Sources and further reading
- What is GitHub Pages? GitHub Docs, GitHub. https://docs.github.com/en/pages/getting-started-with-github-pages/what-is-github-pages, accessed 28 Nov 2026.
- Securing your GitHub Pages site with HTTPS. GitHub Docs, GitHub. https://docs.github.com/en/pages/getting-started-with-github-pages/securing-your-github-pages-site-with-https, accessed 28 Nov 2026.
- Verifying your custom domain for GitHub Pages. GitHub Docs, GitHub. https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/verifying-your-custom-domain-for-github-pages, accessed 28 Nov 2026.
- Content Security Policy (CSP). MDN Web Docs, Mozilla. https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CSP, accessed 28 Nov 2026.