Blog

Other websites are displaying images from your hosting: what hotlinking is and how to limit it

GazduireOnline.ro yazarı
Yayınlayan
GazduireOnline.ro PR

Bu içerik yalnızca Rumence ve İngilizce olarak mevcuttur; aşağıda İngilizce metin gösterilmektedir.

Other websites are displaying images from your hosting: what hotlinking is and how to limit it

A photograph from your online shop appears on another website, but the image still loads from your address. Visitors to that website can therefore generate requests to the infrastructure delivering your images. This is image hotlinking. To limit it sensibly, you need to investigate those requests and test restrictions without disrupting your own pages, partners or connected services.

What hotlinking means and how it differs from copying

Hotlinking happens when an external page displays a file using its direct address on your hosting. For example, a blog might display your product photograph using “https://shop.example/images/backpack.jpg”. The reader’s browser requests the image from that address rather than from the blog’s server.

Copying is different: someone downloads the photograph and publishes it on their own infrastructure. Subsequent views no longer generate requests to your original file. Anti-hotlinking restrictions do not remove existing copies or prevent every download.

Image hotlinking can affect your hosting’s data transfer, although the impact depends on request volume, file size and caching. It does not automatically mean unauthorised use: a partner may have your permission to display the photographs. Separately, where protected images are used without permission, Romania’s relevant legal framework includes Law No. 8/1996 on copyright and related rights.

How to identify external requests

Start with a specific file rather than your total transfer figures. Check the available server or CDN access logs for requests to that image. A CDN is a network that can deliver cached files before requests reach your origin server.

  • Check the requested file address, time, response status and amount of data transferred.
  • Look at the HTTP “Referer” field, if recorded: it may identify the page where the request originated.
  • Compare the domains you find with your own websites and authorised partners.
  • Look for recurring patterns rather than treating a single request as proof.

For example, repeated requests for “/images/backpack.jpg” associated with the same external article deserve investigation. Open that article and use the browser’s developer tools to check the network requests and confirm whether the image actually loads from your address.

A rise in traffic alone does not prove hotlinking. Your own campaign, automated visitors or legitimate image sharing could explain it. If you use a CDN, inspect its logs too: the origin server may see only some of the requests.

Why the reported source is not reliable proof

The “Referer” header is useful, but it is not an authentication mechanism. Browsers may omit it or reduce its detail for privacy reasons, depending on the page’s policy and the request context. Some applications do not send it, while automated clients can forge it.

For example, a legitimate request may have no referrer when someone opens an image address directly. A preview service may also fetch the file without reporting an originating page. In other cases, you may see only the domain rather than the full article address.

  • Allowing requests without a referrer preserves compatibility but leaves a way around the restriction.
  • Blocking those requests can disrupt direct access and legitimate integrations.
  • Checking only the declared referrer does not stop a client that supplies a false value.

Treat these rules as a way to reduce unwanted use, not as absolute protection. For private resources, referrer checks are not a substitute for authentication and authorisation.

How to prepare image protection rules

Begin by listing the addresses that must continue working. Include your main domain, the relevant versions with or without “www”, necessary subdomains and approved partners’ domains. If images are delivered through a separate domain, document that delivery route as well.

An initial rule might cover only “/images/products/” and reject requests declaring an unapproved external referrer, while temporarily allowing requests with no referrer. This is an example of a compatibility-focused compromise, not a setting that automatically suits every website.

  • Limit the restriction to the files and directories you actually want to protect.
  • Match domain names precisely; a simple text search can mistakenly accept misleading domains.
  • Where your configuration supports it, return a refusal such as “403” without creating redirect loops.
  • Check automatically transformed images, thumbnails and alternative formats separately.

For example, if an approved comparison service fetches your product photographs, establish how it actually requests them before adding an exception. A domain allowlist will not solve the integration if the service sends no referrer at all.

Apply the rule where the file is actually delivered: at the server, proxy or CDN. A restriction installed only at the origin may not immediately affect images already held in an edge cache.

Test restrictions before extending them

Save the current configuration and prepare a way to restore it. Apply the change to a small group of images first. If a monitoring-only mode is available, use it to see which requests would be rejected without blocking them yet.

  1. Open your own image-bearing pages, including category pages, product pages, articles and search results.
  2. Test the domain versions and subdomains you actually use.
  3. Create a test page on an external domain you control and embed the image using its direct address.
  4. Open the image address separately to check your policy for requests without a referrer.
  5. Check important integrations, including newsletters, social previews, product feeds and partners.
  6. Compare browser results with the logs and the responses from your server or CDN.

For example, the image should remain visible on your product page, while an embed on the unapproved test domain should receive the refusal you configured. Test actual browser behaviour rather than relying only on manually constructed requests with a referrer of your choice.

Caching can hide the effect of a change. Temporarily disable the browser cache through developer tools and check the CDN cache separately. One successful test does not confirm that every scenario works correctly.

A practical plan for your next check

Choose a frequently used image, inspect its requests and record the legitimate domains involved. Then apply a narrowly scoped rule, test the important scenarios and watch for unexpected refusals. Keep a record of exceptions and why they exist.

For example, if a photograph disappears from a newsletter after the change, investigate the request made by the service fetching it before switching off all protection. You may need to adjust your policy for requests without a referrer rather than remove every rule.

For your project, consider web hosting from GazduireOnline.ro. Browse the frequently asked questions, and use the contact page for clarification about the available configuration. Include an image address and an example of an external page displaying it: those details make the specific situation easier to investigate.

Sitenizi başlatmaya hazır mısınız?

İstediğiniz alan adının boşta olup olmadığını kontrol edin veya size uygun hosting paketini 10 saniyede öğrenin.

BENZER MAKALELER

İşinize yarayabilecek diğer makaleler. Okurlarımız için güncel ve pratik bilgiler yayınlıyoruz.

BÜLTENİMİZE ABONE OLUN

Bültenimize ve pazarlama iletişimlerimize abone olun. Size yenilikleri ve kampanyaları göndereceğiz.

Bülten aboneliği illüstrasyonu