Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Hotlink protection blocking your own subdomains: how to fix it

OPS-121Low impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

Hotlinking means another website loads your image, video or PDF straight from your server. It uses your bandwidth and gives you nothing back. Hotlink protection is a rule that stops this. It reads the Referer header, which tells your server which page asked for the file. If the referer is not on an allowed list, the server refuses the file, usually with a 403 error.

Why it costs you leads or sales

The impact is usually low, but it is real. A landing page with a missing hero image, product photos or a trust badge looks broken. Visitors trust it less. A blocked PDF, such as a brochure or price list, can stop a lead from completing a download step.

The page itself still loads and forms still work, so nobody notices. Analytics show no error. You only find out when someone looks at the page or a monitor checks it.

How a blocked image reaches your visitor
  1. Ad clickVisitor lands on go.example.com
  2. Page HTMLLoads normally
  3. Image requestReferer is go.example.com, not on allow list: 403
  4. Trust and offerPage looks broken, visitor hesitates
  5. Form or checkoutFewer visitors reach it

The page loads, but the image request from your own subdomain is refused.

A subdomain page asks for an image and gets refused

The server sees an unfamiliar referer and returns 403.

How to check if your site has it

Find blocked files on your subdomains
  1. Open a page on each subdomain

    Visit your landing, shop, booking and blog subdomains in a private window. Look for missing images, empty logos or broken icons.

  2. Open the browser Network tab

    In Chrome press F12, choose Network, reload and filter by Img. Red rows with status 403 point to blocked files.

  3. Check which host serves the file

    Click a failed row. Note the file host and the Referer in the request headers. If the referer is one of your own subdomains, hotlink protection is the likely cause.

  4. Test from the command line

    Request the file with and without your subdomain as referer and compare the status codes.

Compare status codes with different referersbash
# Replace the image URL and subdomain with yours
curl -s -o /dev/null -w "no referer: %{http_code}\n" https://example.com/images/hero.jpg
curl -s -o /dev/null -w "own subdomain: %{http_code}\n" -e https://go.example.com/ https://example.com/images/hero.jpg
curl -s -o /dev/null -w "other site: %{http_code}\n" -e https://other-site.test/ https://example.com/images/hero.jpg

If the own subdomain returns 403 and the no-referer request returns 200, your allow list is missing that subdomain. The other-site request should return 403; that is the protection working as intended.

How to fix it

The fix is the same everywhere: add every host you own to the allowed list and allow blank referers. Where you do it depends on who applies the rule.

Allow your own subdomains
  1. Find where the rule lives

    WordPress itself has no hotlink setting. It comes from your host (cPanel), a CDN, or a security or image plugin. Check your host panel and any plugin with a hotlink or image protection option.

  2. Add the subdomains

    In cPanel go to Security, Hotlink Protection. Add each subdomain with its protocol to the URLs allowed list, for example https://go.example.com and https://shop.example.com. Keep Allow Direct Requests ticked.

Apache: allow blank referers and all your subdomainshtaccess
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^https?://([a-z0-9-]+\.)?example\.com(/.*)?$ [NC]
RewriteRule \.(jpe?g|png|gif|webp|svg|pdf)$ - [F,NC]
Nginx: allow blank referers and all your subdomainsnginx
location ~* \.(jpe?g|png|gif|webp|svg|pdf)$ {
    valid_referers none blocked example.com *.example.com;
    if ($invalid_referer) {
        return 403;
    }
}

How to confirm it's fixed

Confirm the fix
  • Purge the CDN and browser cache, then reload every subdomain page in a private window.
  • The Network tab shows 200 for all images and files, with no red 403 rows.
  • The curl test with your subdomain as referer returns 200.
  • The curl test with an outside site as referer still returns 403, if you want protection kept.
  • Downloads such as PDFs open from each subdomain.
Allow list before and after

Before

  • Only www.example.com allowed
  • go.example.com and shop.example.com get 403
  • Landing pages show broken images

After

  • *.example.com and blank referers allowed
  • All own subdomains get 200
  • Outside sites are still blocked

How to prevent it happening again

Use a wildcard for your domain instead of a hand-typed list. Add a step to your launch checklist: when you create a new subdomain, open a page there and check that images load. Also keep a note of where hotlink rules live (host, CDN, server config), because a migration or new CDN can bring them back with default settings.

Think about whether you need hotlink protection at all. For marketing images it often saves little, and it can block legitimate uses such as email clients, social previews and search engines, which sometimes send no referer or an unexpected one. Allowing blank referers helps with most of these.

How FunnelGuard handles this

FunnelGuard detects this issue today. A robot visitor runs your real customer journeys on a schedule, loading your pages the way a customer would. When images or files on a page fail to load, such as a 403 on an image requested from your own subdomain, the check flags it. A failure is re-checked from a second region before one alert goes out, with a screenshot and a likely cause.

The Free plan covers 1 site and 2 journeys with daily checks and needs no card. Paid plans start at $39/month with a 3-day free trial. A free read-only website audit is also available.

Questions people ask

Why are images on my subdomain showing 403 Forbidden?

The most common cause is hotlink protection that only allows your main domain. Requests from go.example.com or shop.example.com carry a different referer and are refused. Add your subdomains, or a wildcard like *.example.com, to the allow list.

How do I allow subdomains in cPanel hotlink protection?

Open cPanel, go to Security, then Hotlink Protection. Add each subdomain with its protocol (for example https://go.example.com) to the allowed URLs. Keep Allow Direct Requests ticked so blank referers work.

Does Cloudflare hotlink protection block my own subdomains?

It can. Cloudflare's Scrape Shield toggle has no allow list you can edit in the dashboard. If your subdomains are blocked, turn it off for the zone or replace it with a custom rule that allows your own hosts.

Should I allow blank referers in hotlink protection?

Yes, in most cases. Direct visits, some privacy tools, email clients and apps send no referer. Blocking them breaks legitimate use. Allowing blank referers still stops most hotlinking from other websites.

How can I test hotlink protection with curl?

Request the file three times: with no referer, with your subdomain as referer (-e https://go.example.com/), and with an outside site. Your own subdomain should return 200 and the outside site should return 403.

Does hotlink protection affect SEO?

It can if search engines or social previews are refused the images. Allowing blank referers and your own hosts avoids most problems. Check that important images load when fetched directly.

Can FunnelGuard detect hotlink protection blocking my pages?

Yes. FunnelGuard loads your journeys like a visitor and flags images or files that fail on a page, such as a 403 from your own subdomain. You get one alert with a screenshot and a likely cause after a second-region re-check.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.