Choosing Where to Host Your First Static Directory Site
The first time you build a static directory, the hosting question tends to arrive late. The pages are generated, the map works on your laptop and then you realize you need somewhere to put a folder of a few thousand HTML files. Most people pick whatever host they used last, and that usually works. It is still worth ten minutes of thought, because moving a live directory later means redirects, a new deploy routine and a nervous week watching Search Console.
This note walks through what matters when you choose a host for a first static directory, from how the files get there to what happens when you rebuild after a data refresh. It assumes the site is plain HTML, CSS and JavaScript with no server code, which is how most generated directories ship.
What a static directory asks of a host
A static directory is simple to serve. Every page already exists as a file, so the host only has to hand files to browsers quickly. There is no database to keep running and nothing to patch at two in the morning.
The things that do matter are a little less obvious. A directory has a lot of pages compared with a brochure site, and every refresh can change hundreds of them at once. So you want a host that handles a large number of files without complaint, deploys a whole new version in one step and lets you roll back if a build goes wrong. You also want clean URLs, so that /tacoma/ serves /tacoma/index.html without showing the file name.
The usual candidates
The common static hosts all cover the basics: HTTPS, custom domains, a content delivery network and a way to deploy a folder. GitHub Pages and GitLab Pages publish from a Git repository. Netlify, Cloudflare Pages and Vercel can deploy from Git too, and they also accept a folder or a zip uploaded through their command line tools or API.
The differences show up in the workflow around the host. Git-based hosting keeps a full history of every build, which is handy when you want to see what changed between two refreshes. Upload-based hosting skips the repository and is quicker to script. Some hosts also add extras like form handling or redirect rules in a config file, which can save you from wiring up a third-party service for the contact form.
Check each host's current documentation for limits on file count, site size and build minutes before you commit. These change over time, and a directory with many thousands of pages can bump into a limit that a small site never sees.
How deploys fit a refresh routine
A directory is never finished. You re-export listings from Outscraper, Apify or any scraper, clean them, rebuild every page and push the new version live. The host should make that last step boring.
A good routine looks like this:
- Rebuild the whole site into a fresh folder from the new export.
- Compare the new folder with the live version and look at what changed.
- Deploy the full folder as one new version.
- Open a few city pages on your phone and check the counts look right.
Deploying the whole folder at once matters. If you upload changed files one by one, a visitor can land in the middle and see a city page that links to a listing page that does not exist yet. Hosts that swap the whole site atomically avoid that.
For a worked example of the build side, our dev.to walkthrough on building a static local directory from a Google Maps CSV shows how the files get generated before any of this starts.
Domains, redirects and the things you set once
Decide on the final domain before launch if you can. Changing domains later is possible, but every page needs a redirect and search engines take a while to catch up.
Set these up on day one:
- The custom domain, with the www or non-www version chosen and the other one redirecting
- HTTPS enforced, so the plain http address redirects
- A custom 404 page that links back to the homepage
- Redirect rules for any old URLs, if you are replacing an existing site
Keep your redirect rules in a file inside the build output when the host supports it. That way they deploy with the site and never get lost when you switch machines.
When to move hosts
Most directories never need to move. The reasons that do come up are practical ones: the site has outgrown a file or bandwidth limit, the deploy step has become slow enough to put you off refreshing, or a client wants the site on their own account.
If you do move, deploy to the new host first and test it on its temporary address. Then switch DNS. Since the files are identical, visitors and search engines should not notice anything except, perhaps, slightly faster pages. Our notes on the technical side of static directory sites cover DNS and caching in more detail for anyone planning a move.
Questions about hosting a static directory
Can I host a directory with thousands of pages on a static host?
Usually yes. Static hosts serve files, and a few thousand small HTML files is a normal load. Check the host's documented limits on file count and deploy size, since those are the numbers a large directory is most likely to reach.
How does a contact form work without a server?
The form posts to a form handling service or to a built-in feature some hosts offer. The page itself stays static. Test it after every deploy by sending yourself a message.
Should agencies host client directories on their own account?
It depends on who will own the site long term. Hosting on the client's account makes handover simple, while hosting on yours keeps deploys in one place. Agree on it during scoping. 1 Click Directory Builder outputs a complete static site from a Google Maps export, so the files can go on whichever host you settle on.