Check the server's logs for image requests referred by other sites, then switch on hotlink protection for image files, allowing your own domains, blank referrers and image search, and sending a substitute image to everyone else.

Your kitchen, on someone else's page

A cabinet maker finds a photo of one of its finished kitchens in a home renovation forum, in a classified ad for a house, and on a page copied from its own site.

The photo was never uploaded to any of those sites. Each page simply points at the file on the cabinet maker's hosting account, and every visitor's browser fetches it from there.

The cabinet maker pays for every view, and its work sits beside content the business never approved, with nothing saying whose kitchen it is.

How hotlinking works

A web page can display an image from any address on the internet. The page holds only a pointer, and the visitor's browser asks the server at that address for the file.

The server hands the file to anyone who asks. Each request carries the address of the page that asked, called the referrer, and the server records it.

So a busy forum thread showing your photo sends a steady stream of requests to your server, for pages you have never seen.

What it costs

Hotlinking does more than borrow a picture.

Bandwidth is the one that arrives as a bill or a warning. Many shared hosting plans include a monthly transfer allowance, and a popular thread can use a large part of it in days.

Spotting it in the server's logs

The server's access log records each request with the file asked for and the referring page. Image requests whose referrer belongs to another website are hotlinks.

Most hosting control panels also summarise the logs: bandwidth by file, and the sites sending requests. A photo near the top of the bandwidth list, with a forum among the referrers, tells the story.

The usual first sign is monthly bandwidth climbing while visits to the site stay level.

How hotlink protection works

Hotlink protection is a server rule that checks the referrer on requests for image files. When the referring page is part of your own site, the image is sent; when it belongs to another site, it is refused.

Instead of a plain refusal, the rule can send a small substitute image carrying your web address, so readers of the other page learn where the photo came from.

Many hosting control panels offer the rule as a setting, and whoever manages the server can also write it into the server's configuration.

Keeping image search and shared links working

A rule written too tightly blocks more than it should. Image search results can show a larger copy of a photo loaded straight from your server, with the search engine as the referrer.

Allow requests with no referrer at all, since some browsers, privacy settings and apps send none. Allow your own domain with and without www, and the search engines whose image results you want to keep.

Links to your pages keep working either way, because the page loads from your site. Sharing a page on social sites usually survives too, since those sites fetch their own copy of the picture.

A worked example

A native plant nursery in the Cowichan Valley sells shrubs, ferns and wildflowers native to the coast, and its website shows every plant in flower and in fruit.

Its host sent a notice that the plan was nearing its monthly bandwidth limit, although visits were steady. Gardeners, it turned out, had been using the photos to identify plants.

The access logs showed thousands of requests for a few photos, referred by a gardening forum thread, a landscaping blog and a classified ad for a house with a native garden.

Hotlink protection was switched on for image files, with exceptions for the nursery's own domains, blank referrers and the main search engines. Blocked requests now receive a small image carrying the nursery's web address.

The forum's readers see where the photos come from, image search still shows the plants, and the nursery's bandwidth goes to people who are actually on its pages.

Other ways to respond

For one or two heavily used photos, renaming the file and updating your own pages breaks the outside links at once, without any server rule.

A polite message to the other site often works as well. Many forum members do not realise that showing a photo this way costs its owner anything, and will gladly link to the page instead.

Keep a note of which photos were hotlinked and from where, in case the same pages turn up again under a new address.

Your own newsletters and partners

After the rule goes on, check everything of your own that loads images from the site: email newsletters, pages on other domains you own, and partner sites that show your photos with permission.

Add each of those sources to the allowed list, so the rule stops strangers without stopping you.

The counter-case

Some businesses are glad to see their photos travel. A supplier showing your products with your agreement, or a local paper writing about your work, helps you, and those sites can be allowed.

And a small site on a plan with plenty of bandwidth may decide a few hotlinks are not worth a rule at all.

But the decision should be yours, made with the logs in front of you. Hosting watched by someone who reads those logs catches this long before the bandwidth warning does.

Taking back your images

  1. Compare monthly bandwidth with visits.
  2. Read the access logs for outside referrers.
  3. List the photos being hotlinked, and from where.
  4. Switch on hotlink protection for image files.
  5. Allow blank referrers, your own domains and image search.
  6. Send a substitute image with your web address.
  7. Test your own pages, newsletters and shared links afterwards.

Step five keeps the rule from doing harm. Blocking blank referrers or image search turns away genuine visitors along with the borrowers, and the damage is easy to miss because the site itself still looks fine.

On many servers the rule is written into the small .htaccess file, and why changes to that file belong with whoever manages the server is the focus of the server settings file that took the whole site down.


Frequently asked questions

What is hotlinking?

Another website showing your image by pointing at the file on your server. Each time their page is viewed, the browser downloads the photo from your hosting account.

How can I tell whether my photos are hotlinked?

Look in the server's access logs, or the control panel's summaries of them, for image requests referred by other websites, and for bandwidth climbing while visits stay level.

How does hotlink protection work?

A server rule checks the referring page on each image request. Requests from your own pages are served, while requests from other sites are refused or sent a substitute image.

Will hotlink protection break image search?

It can if the rule is written too tightly. Allow the search engines whose image results you want, your own domains, and requests that carry no referrer.

Do links to my pages still work?

Yes. Pages load from your own site, so ordinary links and shares keep working. The rule only stops other pages showing your files inside themselves.

Is there a quick fix for one photo?

Rename the file and update your own pages. The outside links break at once, and the other site shows a missing image instead of your work.

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.

Bandwidth climbing while visits stay flat?

Ask us to read your server logs, and we will set up hotlink protection that keeps image search and your own pages working.

Start a Conversation