Find the files your pages ask for that no longer exist, in the server's access log or the browser's network view. Remove each reference or supply the file, so no page view builds extra not found pages.

A slow site with nothing new on it

A shop's website has grown sluggish over the past year, and the host has written about the account using more than its share of the server. Yet nothing new has been added.

Behind each page, the browser asks for three files that are no longer there: a background from an older design, a deleted script, and an icon the theme names that was never made.

Each request fails out of sight. The page still appears, the missing pieces were never visible anyway, and the only sign is a server working harder than it should.

How one missing file becomes a page build

Content systems such as WordPress, Joomla and Drupal usually give pages tidy addresses with no file names. To make that work, the server passes any address that matches no real file to the system itself.

That includes the address of a missing image. The system starts up, connects to the database, works out that nothing exists there, and builds a complete not found page, menus, sidebar and all.

The browser asked for a small picture, receives a whole page, and throws it away. Three missing files make four page builds out of every page view.

Where the dead references hide

Missing files rarely sit in the visible text. They hide in the parts of a site that visitors never read:

The tab icon deserves a special mention. Browsers ask for it on their own, even when no page names it, so a site without one gets that failed request from visitor after visitor.

Why the cost multiplies

A file that exists can be kept by the browser and not fetched again on the next page. A missing file leaves nothing to keep, so the request repeats on every page of every visit.

Search engine crawlers and other automated visitors follow the same references. At a busy time, those extra page builds are often what pushes a shared account past the limits the host allows.

Visitors feel it too. A browser waiting on a script in the header may hold back the rest of the page until the server's not found answer arrives.

Finding them in the error reports

Most hosting control panels show the server's error log and its access log. The access log records every request with a status code, and 404 marks a file that was not found.

Search for 404 and look for one address repeating many times a day. A missing image requested by every page stands out at once from the occasional mistyped link.

The developer tools built into current browsers show the same thing from the visitor's side. Their network view lists every file a page asks for, with the failed ones clearly marked.

A worked example

A skateboard shop in Squamish sells decks, wheels, trucks, shoes and clothing from its store, and through a small online shop on the same website.

Its theme had been restyled twice. The first look had a concrete texture behind every page, and the second dropped it from the design but not from the stylesheet.

A photo slider had been removed, but its script line stayed in the header. The theme also named an icon for phone home screens that had never been made.

Each time a new shipment of decks went up on Facebook, the site slowed and the host sent a warning.

The access log showed all three addresses on every page view, each answered with a full page from the online shop.

The developer deleted the dead lines from the stylesheet and header, made the icons in the sizes browsers and phones request, and set the server to answer any other missing image or script with a short plain reply.

A visit to a product page is back to one page build and a set of files that all exist, the load the hosting account was sized for.

Removing or replacing each one

Every missing file has one of two answers. If the site no longer needs it, delete the line that asks for it, in the stylesheet, the template or the widget.

If the site does need it, as with the icons, supply the file at the address the page expects. A small icon made from the logo takes a designer very little time.

When other websites still link to an old image, a permanent redirect can send those requests to a current file instead.

A lighter answer for the rest

Some failed requests will always arrive, from old links, mistyped addresses and automated scanners.

The server can answer those for images, scripts and stylesheets without starting the content system at all. A short plain not found reply costs it almost nothing.

Setting that up is a few lines in the server configuration, best done by whoever looks after the hosting.

The counter-case

Sites built as plain HTML files, with no database, are barely affected. Their server answers a missing file with a small built-in message at very little cost.

A very quiet site on a generous server may also never feel the load. The failed requests are still worth clearing there, since they clutter the logs that reveal real problems.

Wherever a content system builds each not found page from the database, dead references are work the server repeats for nothing, and they belong on the list for the next round of maintenance.

Clearing the dead requests

  1. Open the access log in your hosting control panel.
  2. Search for 404 and note the addresses that repeat.
  3. Check one page in the browser's network view.
  4. Remove references to files the site no longer needs.
  5. Supply the icons and other files it does need.
  6. Answer stray requests for images and scripts cheaply.
  7. Search the log again after every theme change.

Step two is where the pattern shows. One failed request is a typing error somewhere; the same address failing all day long is a reference built into every page.

Another leftover from older themes that makes each page do extra work after it loads is described in headings drawn by a script instead of a font.


Frequently asked questions

Why would a missing file slow down a website?

On many content systems the server passes the missing address to the system, which builds a full not found page from the database for a request that wanted a small image.

How do I know if my pages ask for missing files?

Open the access log from your hosting control panel and search for 404 addresses that repeat through the day, or check a page in the browser's network view.

Which missing file turns up most often?

The small icon in the browser tab. Browsers ask for it on their own even when no page mentions it, so a site without one gets that request again and again.

Should I delete the reference or create the file?

Delete the reference when the site no longer needs the file, such as an old background. Create the file when it does, as with icons for tabs and phones.

Can the server answer missing files more cheaply?

Yes. It can reply to missing images, scripts and stylesheets with a short plain message, without starting the content system. Whoever manages the hosting can set that up.

Does a plain HTML site have the same problem?

Much less. Without a database behind it, the server answers a missing file with a small built-in message, though the references are still worth clearing for tidy logs.

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.

Host warning about server load?

Give us access to the site's logs, and we will list the missing files your pages request and clear them.

Start a Conversation