I'm sure many of you are familiar with the term image hotlinking. It's when someone links to your image and uses up your bandwidth. It's very frustrating, because many times, these hotlinkers are not crediting you, and they may also make you exceed your bandwidth limit.
There is a stats tracking application installed on most of your web servers that can help identify and stop hotlinkers. It's called AWStats, and should be available right from your cPanel.
First, we're going to enable AWStats. To do so:
- Log in to your cPanel. Most of the time, you can go to www.yoursite.com/cpanel, or this link is likely in an email your host sent you.
- Scroll down to the Logs section and click Choose Log Programs.
- Check the box underneath AWStats and click Save.
Now, click on the AWStats button, and click on the magnifying glass next to your site name. You should see some stats in this new page. You're now ready to insert the code to track hotlinkers.
To insert the code to track hotlinkers:
- Return to your cPanel, scroll to the Files section, and click on the File Manager. If a box pops up, make sure you select Home Directory, then click Go.
- A new window will open with your file manager loaded. Double click on the tmp directory and double click on the awstats directory.
- Select the file named "awstats.sitename.com.conf" and click Edit in the toolbar. Click on the Edit button in the pop up box.
- Search for "AllowToUpdateStatsFromBrowser". Change that line so it reads as follows:
- Scroll all the way to the bottom of the file and paste this code in, making sure to change the domain name:
- Click Save Changes in the upper right corner, then close the file editor.
# # hotlink # ExtraSectionName1="Hotlinking pages" ExtraSectionCodeFilter1="200 304" ExtraSectionCondition1="URL,\.mpeg$||URL,\.mpg$||URL,\.avi$||URL,\.jpg$||URL,\.gif$||URL,\.png$||URL,\.bmp$||URL,\.jpeg$" ExtraSectionFirstColumnTitle1="Referrer" ExtraSectionFirstColumnValues1="REFERER,^(?!http:\/\/www.sitename.com)http:\/\/(.*)$" ExtraSectionFirstColumnFormat1="<a href='http://%s' target='_blank'>%s</a>" ExtraSectionStatTypes1=HBL ExtraSectionAddSumRow1=1 MaxNbOfExtra1=25 MinHitExtra1=1
You're all set to track hotlinkers! To see who is hotlinking your images, follow these steps:
- From your cPanel, click on AWStats.
- Click on the magnifying glass next to your site.
- Next to where it says Last Update, click on the Update Now link.
- Look in the bottom left corner for a link that says "Hotlinking pages". This is where you see the hotlinkers! Click "Full list" to see the complete list.
Once you have identified the hotlinkers, you might consider sending them an email telling them about what they're doing. Or, you can just block your image from appearing on their site. This is a separate topic and will be covered in an upcoming post.