Move the header, menu and footer into shared include files so one edit updates every page. First find the pages that drifted with a link check and a search for old details, and keep every page address.

Forty pages, forty copies of the menu

An engineering firm's website was built by hand years ago: forty separate pages, each file holding its own copy of the header, the menu and the footer.

When the firm adds a service, the menu has to be edited in forty places. Nobody manages all forty every time, so the pages slowly drift apart.

A client finds the old phone number on a project page. Another clicks a menu link and lands on a page that was removed two years ago.

How the copies drift apart

Each change starts on the pages someone remembers. The home page and the services page get the new menu; the project pages from five years ago do not.

New pages are made by copying an existing one, often an old one, so they arrive with whatever menu and footer that page had at the time.

A find-and-replace across the files catches the phone number written one way and misses it written with dots or spaces, or split across two lines.

Signs a site has drifted

A few minutes of clicking usually shows the symptoms:

Each one tells a visitor that nobody is looking after the site, which is the opposite of what an engineering firm wants a prospective client to conclude.

Finding the pages that drifted

A link-checking program follows every link on the site and lists the ones that fail. The Crawl Errors report in Webmaster Tools shows the broken addresses Google has found.

For old details, search all the files at once for the old phone number, street and email address. A text editor's search across a folder takes seconds.

For the menus, open each page and compare it with the current list of services. Note every difference before changing anything, since that list also records what the site contains.

One menu file, included everywhere

The lasting fix is to keep the header, the menu and the footer in one file each, and have every page include them.

Server-side includes and PHP includes both work this way. The server assembles each page from its parts as it is requested, so visitors and Google receive a complete page as before.

Adding a service then means editing one menu file. All forty pages show the change at once, and no page can keep an old phone number in its footer.

Keeping the page addresses the same

Includes often require pages to end in .shtml or .php instead of .html. Renamed pages break bookmarks, links from other sites and the addresses Google has stored.

Either set the server to process includes in the existing .html files, or redirect every old address permanently to its new one. The host can confirm which the server supports.

List all forty addresses before starting, and check each one afterwards. A page that quietly disappears from the site is worse than a page with an old menu.

A worked example

A heritage consultant in Victoria advises owners, architects and developers on older buildings, from conservation plans to repair advice. Her site has a page for each of about forty projects.

Each page was a separate file, built by a designer who has since retired, and she added new projects herself by copying an earlier page.

When she moved offices, the new address went onto the pages she remembered. A dozen project pages kept the old one, and several menus still linked to a removed workshops page.

A link check and a search of the files found every stale address, broken link and older menu. Two pages also showed garbled accents in a client's name.

The header, menu and footer now live in three include files, the server processes includes in the existing .html pages, and every address stayed the same.

Adding a project now means writing one page of content. The menu and footer arrive with it, already correct, because there is only one copy of each.

When a content management system fits better

Includes end the copying, but someone still edits HTML to add a page. If staff want to add projects, news or people without touching code, a content management system is the better answer.

WordPress, Drupal and Joomla keep one menu for the whole site, so a new page is added to it once, and the owner edits text in a form.

They need updates and security care, and the move takes planning: every page rebuilt, every address kept or redirected. For a site that changes weekly, that work is worth doing.

Doing the conversion carefully

Converting forty pages is careful, repetitive work: cut the same block from every file, insert one include line, and confirm nothing else on the page was lost.

It is best done on a copy of the site, checked page by page, then uploaded at once. A half-converted site is harder to maintain than either version.

A developer will also tidy what the drift left behind: mixed encodings, and old scripts and styles that only some pages load.

The counter-case

A site of five pages that changes once a year can live with copied menus. Editing five files carefully takes minutes, and drift is easy to spot.

A site already due to move to a content management system this spring does not need includes first. Fix the phone number and the broken links now, and let the move do the rest.

But once a site grows past a handful of pages, or several people edit it, every copied block becomes a place for an error to hide.

Bringing forty pages back into line

  1. Run a link check across the whole site.
  2. Search every file for old contact details.
  3. Compare each menu with the current services.
  4. List every page address before changing anything.
  5. Move the header, menu and footer into include files.
  6. Keep or redirect every old address.
  7. Decide whether a content management system fits better.

Step four protects everything else. With the list of addresses in hand, each page can be checked after the change, and nothing disappears from the site or from Google unnoticed.

Garbled accents have a cousin in the files a shop exports, where a spreadsheet guesses the character set, as order exports that open garbled in a spreadsheet explains.


Frequently asked questions

Why do pages on a hand-built site drift apart?

Each file holds its own copy of the menu, header and footer. Changes reach the pages someone remembers, and new pages are copied from old ones.

How do I find the pages that drifted?

Run a link checker for broken links, search all the files for old phone numbers and addresses, and compare each page's menu with the current list of services.

What is a server-side include?

A line in a page that tells the server to insert another file, such as the menu, before sending the page. Visitors and Google receive one complete page.

Will includes change my page addresses?

They can, if pages are renamed to end in .shtml or .php. Set the server to process the existing .html files, or redirect every old address permanently.

When is a content management system better?

When the owner or staff want to add pages without editing code, or the site changes often. It keeps one menu for the whole site, so each new page is added once.

Is a small hand-built site a problem?

Not necessarily. A five-page site that rarely changes can be kept consistent by hand. The risk grows with every page added and every person editing it.

West Coast Media Solutions Inc. provides web design, web development, hosting, digital marketing, and business consulting to organisations across Canada, drawing on more than twenty-five years in the field.

Forty pages and forty copies of the menu?

Tell us where the site lives, and we will list the pages that drifted and quote moving the shared parts into includes.

Start a Conversation