Reference for Command-Line Utilities, Plesk for Linux
  • History of Changes
  • Command Line Utilities Overview
  • Getting Started with Command Line Utilities
  • Plesk Utility
  • Using Command Line Utilities
    • admin_alias: Additional Administrator Accounts
    • admin: Administration Panel Preferences
    • anonftp: Anonymous FTP Access
    • aps: Application Catalog
    • autoresponder: Mail Autoresponders
    • branding_theme: Plesk Branding
    • certificate: SSL/TLS Certificates
    • cloning: Server Cloning Settings
    • custom_plan_items: Custom Plan Options
    • custombutton: Custom Buttons
    • customer: Customer Accounts
    • database: Databases
    • database-server: Database Servers
    • dns: DNS Zones on Domains
    • domain_restriction: Prohibited Domain Names
    • domalias: Domain Aliases
    • event_handler: Event Handlers
    • extension: Extensions
    • ftpsubaccount: Additional FTP Accounts
    • git: Git Repositories
    • grey_listing: Greylisting
    • hotlink_protection: Site Content Protection from Hotlinking
    • init_conf: Server Configuration
    • ip_ban: IP Address Banning (Fail2Ban)
    • ip_pool: IP Pools
    • ipmanage: IP Addresses
    • keyinfo: License Key Properties
    • license: License Keys
    • locales: Plesk Locales
    • mail: Mail Accounts
    • maillist: Mailing Lists
    • mailserver: Mail Server Settings
    • nodejs: Node.js Versions
    • notification: Email Notification About System Events
    • optimization_settings: Apache Modules Management
    • panel_gui: Links to Domain Registration and Certificate Purchasing Services
    • php_handler: PHP Handlers
    • pleskbackup: Backing Up Content and Configuration
    • pleskrestore: Restoration from Backup
    • poweruser: Power User Mode
    • product_info: Product Information
    • protdir: Site Directories Protection
    • reseller: Reseller Accounts
    • reseller_plan: Reseller Plans
    • role: User Roles
    • secret_key: Authentication in the XML API Service
    • server_dns: DNS Zone Template
    • server_filesharing: File Sharing
    • service_plan_addon: Hosting Plan Add-ons
    • service_plan: Hosting Plans
    • server_pref: Interface and System Preferences
    • service: Services
    • site: Sites
    • skeleton: Virtual Host Templates
    • spamassassin: Spam Filtering
    • statistics: Calculating Statistics
    • subdomain: Subdomains
    • subscription: Subscriptions
    • subscription_settings: Hosting Subscription Settings
    • tomcat: Tomcat Service and Java Applications on Domains
    • traffic: Traffic on Domain
    • user: Users
    • vps_optimized: VPS-optimized Mode
      • Apache Modules Switched Off in VPS-Optimized Mode
    • webstat: Web Statistics
    • webuser: Web Users
    • wp-toolkit: WordPress Toolkit
Reference for Command-Line Utilities, Plesk for Linux
  • Docs »
  • Using Command Line Utilities »
  • hotlink_protection: Site Content Protection from Hotlinking

hotlink_protection: Site Content Protection from Hotlinking¶

The hotlink_protection utility serves to configure protection from hotlinking on domains. Use this utility to do the following:

  • Set up hotlinking protection on a domain.
  • Retrieve the current configuration of domain hotlinking protection.

Location¶

%plesk_cli%

Usage¶

hotlink_protection command [parameter] [
<option 1> <param 1>[
<option n> <param n>]]

Example¶

The following command enables hotlinking protection on the domain example.com with the following parameters: protected content is image files with extensions JPG, JPEG, GIF, PNG, TIFF, exception is made only for domain jonny.blogs.sample.net:

plesk bin hotlink_protection --update example.com -enabled true -protected-extensions "jpg;jpeg;gif;png;tiff" -friendly-domains jonny.blogs.sample.net

Commands¶

Command Parameter Description Example
--update or -u <domain name> Changes hotlinking protection settings.

To add to the protection list (already including JPG, GIF) file extension BMP for the domain example.com:

plesk bin hotlink_protection --update example.com -protected-extensions bmp
--info or -i <domain name> Retrieves current hotlinking protection configuration.

To retrieve information on the hotlinking protection settings for domain example.org:

plesk bin hotlink_protection --info example.org
--help or -h   Displays help on the utility usage.
plesk bin hotlink_protection --help

Options¶

Option Parameter Description Example
-enabled true| false Enables/Disables hotlinking protection.

To turn the hotlinking protection off on the domain example.com:

plesk bin hotlink_protection --update example.com -enabled false
-protected-extensions "<ext1>;<ext2>;<...>;<ext n>" Defines the protected file extensions.

To add to the protection list (already including JPG, GIF) file extension BMP for the domain example.com:

plesk bin hotlink_protection --update example.com -protected-extensions bmp
-friendly-domains <domain1>;<domain2>;<...>;<domainn> Defines friendly domains, which are allowed to hotlink the files.

To allow users of blogger.com hotlink files hosted on domain example.com:

plesk bin hotlink_protection --update example.com -friendly-domains blogger.com

© Copyright Plesk

Built with Sphinx using a theme provided by Read the Docs.