How to stop other sites from hotlinking your images

Hotlinking is when another website shows your images or files straight from your server. It uses your bandwidth and slows your site, while giving you nothing. Hotlink protection blocks it.

Steps

If your cPanel uses the Jupiter theme

  1. Log in to cPanel and open Security > Hotlink Protection.
  2. Click Enable.
  3. Check the list under URLs to allow access. It should include your own domain names, with and without www, and any subdomains.
  4. In Block direct access for the following extensions, list the file types you want to protect, such as jpg, jpeg, gif, and png.
  5. Tick Allow direct requests if you want people to open the files by typing the address directly.
  6. Optionally, add an address in Redirect the request to the following URL, such as a small warning image.
  7. Click Submit.

If your cPanel uses the Meridian theme

  1. Log in to cPanel and click Security in the left sidebar.
  2. Open the Protection tab and find the Hotlink Protection section.
  3. Switch the toggle on. The label changes to Hotlink protection enabled and the rest of the settings appear.
  4. Review the Protected file types list. It usually starts with common image extensions. Add or remove types as needed, or use the Quick add buttons for Images, Documents, or Audio/Video.
  5. Add every version of your own domain to Allowed referrer URLs, including http:// and https://, and www and non-www. Missing one can block images on your own site. Click Add after each URL.
  6. Leave Block direct requests (no referrer) off if you want people to open files by typing the address. If you turn it on, choose whether to Return 403 Forbidden or Redirect to URL when a hotlink is detected.

Why it matters

If a popular page or forum links directly to a large picture on your site, every view uses your bandwidth, and your own visitors may find the site slower. Hotlink protection is a simple, free way to stop this. Check your bandwidth graphs under Metrics > Bandwidth if you suspect it is happening to you.

Tips and troubleshooting

  • Always make sure all your own domains and subdomains are in the allowed list. Otherwise your own website may lose its images.
  • Allow any site that you do want to show your images, such as a partner site.
  • If you click Disable, the list of allowed sites is deleted. Make a note of it first.
  • If images do not load after you enable this, check that your own domain names are in the list.
  • Social media and search engines may need to be allowed so that your images show correctly when shared.
  • Contact support if images disappear and you cannot work out why.

Need help? Contact Barrett IT Support at support@barrettit.com or call 888.374.4632.

  • 0 Els usuaris han Trobat Això Útil
Ha estat útil la resposta?

Articles Relacionats

How to check your SSL certificate and secure your website

An SSL certificate encrypts the connection between your website and visitors and makes the...

How to fix "Not secure" warnings and mixed content

Sometimes a website has a valid SSL certificate but the browser still says the site is not secure...

How to change your cPanel password

A strong, unique cPanel password protects your whole hosting account. Change it regularly, and...

How to set up two-factor authentication (2FA) for cPanel and WHM

This article is for people who log in to a Barrett IT hosting account in cPanel, and for reseller...

How to block an IP address from your website

If you see unwanted visitors, such as someone repeatedly trying to break in or scraping your...