1CDirectory Builder Field Notes

How to Check a Static Directory Build Before You Upload It

A static directory build is a folder full of HTML files. When it comes out of a generator, it looks finished, and the temptation is to upload it straight away. Most of the time that works. Sometimes a city page is missing, a filter shows nothing, or the sitemap still points at last month's address, and you only find out when a visitor or a search console report tells you.

Checking the folder before it goes live takes about half an hour once you have a routine. These notes walk through that routine for a first directory: what to count, what to click, what to open in a text editor and what to test on your own machine before anything reaches a host.

Count the pages you expect

Start with arithmetic. Before you open a single page, work out how many you should have. If your export covers 14 counties and 61 cities, and you have 9 categories, you know roughly how many county pages, city pages and category pages the build ought to contain. Add one page per listing if your site gives each business its own page.

Then count what is actually in the folder. On a Mac or Linux machine you can ask the terminal to count the index files under each folder, and on Windows the file explorer will show item counts. If the numbers are far apart, stop and find out why. A missing city usually means its rows had a blank or misspelled city field in the export. Extra pages often mean the same town was spelled two ways.

This step catches more problems than any other, because it tells you about the data and the build together.

Open one page of each type

Next, open the homepage in a browser straight from the folder, then click through one example of every page type: a county page, a city page, a category page, a listing page, the search results and the contact page. You're looking for anything that looks wrong at a glance. Broken styles, a heading that says "undefined", a map with no pins, a listing with no name.

Pick the samples on purpose. Choose the city with the most listings and the city with the fewest. Choose a business with a long name, one with no website, and one with no reviews. Odd records are where templates fall apart.

Some features may not work when you open files directly, because browsers restrict what a local file can load. If the map or search fails this way, run a small local web server from the build folder instead. Python ships with one, and most code editors have an extension that does the same job.

Internal links are easy to break when a slug changes. A free link checker can crawl the folder through your local server and list every link that returns an error. Fix the template or the data that produced the broken link, then rebuild, rather than patching individual HTML files by hand. Hand edits vanish the next time you generate the site.

Open the 404 page and make sure it links back to the homepage. Then open sitemap.xml in a text editor. Every address in it should use the final domain you plan to publish on, not a preview address or a local path. Check robots.txt at the same time. A leftover rule that blocks everything is a common reason a new directory never appears in search.

If you want to go further and make these checks automatic, there's a good walkthrough of testing a static directory build with Lighthouse CI that shows how to run audits on every build.

Test search, filters and the form

Search and filters are the parts visitors use most and the parts owners test least. Type the name of a real business and see whether it appears. Search for a category word, then for a city. Try a misspelling to see what an empty result looks like. Turn on two filters at once and check the count makes sense.

The contact form deserves its own test. Send a message to yourself and confirm it arrives, with every field intact. If the form posts to a third-party service, check that the service has the right destination address before launch day, not after.

Keep a short checklist

Write the routine down as a numbered list and keep it next to your build script. A simple version looks like this:

  1. Compare page counts with the export.
  2. Open one page of each type, including the odd records.
  3. Run a link checker through a local server.
  4. Read sitemap.xml and robots.txt.
  5. Test search, two filters together and the contact form.

The list will grow as you find new ways for a build to go wrong. That's normal. More notes on the technical side of static directories are collected in this guide to building static directory sites. If you build with 1 Click Directory Builder, which turns a Google Maps export into a complete static directory, the same checks apply to the folder it produces before you upload it.

Questions about checking a directory build

How long should a pre-launch check take?

For a first directory with a few hundred listings, plan on an hour the first time. Once the checklist is familiar, a rebuild check usually takes much less.

Do I need to check every listing page?

No. Check samples that represent the unusual records, plus the page counts. If those look right, the template is almost always fine for the rest.

What if the build looks fine locally but breaks on the host?

That usually points to paths. A site built for the root of a domain can break when served from a subfolder, and the reverse. Check the base address the generator used against the address you deployed to.