How to Prevent Hotlinking
Hotlinking, also known as deep linking, occurs when one web site links directly to graphics files on another web site.
The site which serves the images pays for the bandwidth. The site which links to the images gets free content for its users.
Many webmasters object to being hotlinked to, but hotlinking is difficult to prevent.
Preventing Hotlinking with Apache
On an Apache web server, you can use mod_rewrite and .htaccess to prevent any web page other than your own from accessing your graphic images.
Your .htaccess rule to block hotlinking will look something like this:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?tech-faq.com(/)?.*$ [NC]
RewriteRule .*.(gif|jpg|jpeg|bmp)$ [R,NC]
To make this process easier, html basicx maintains a code generator which will create the correct .htaccess entries to prevent hotlinking.
For more information on preventing hotlinking, read Ken Coar’s excellent article Keeping Your Images from Adorning Other Sites.
- Should I Use WWW in my site name?
Some users type “www.topbits.com” into their web browsers when they want to reach this web page. Other users type in only “topbits.com”, leaving off the “www” portion. On a technical level, the two names do not refer to the same domain object. Google, and other search engines, often see these two objects as seperate web [...]...
- How to Create a 301 Redirect
The 301 redirect is an efficient means of webpage redirection, to be used when you have redesigned your website. This HTTP code stands for 'moved permanently'. The 301 redirect can be implemented by creating a .htaccess file in Apache servers. The process to create 301 redirects depends on the web server being used. The Meaning [...]...
- How to Prevent Caching of Your Web Page
How to Prevent Caching The web documents, media and other web resources that are retrieved by a web browser are often saved, or cached, locally on the user’s hard drive. Caching reduces load times when a user browses the Internet by reducing the amount of new data that needs to be transferred. The next time [...]...
- How to Find Broken Links
Broken links annoy the visitors to your web site, which lowers you percentage of return visitors. In addition, broken links on your web site may negatively affect your search engine rankings. Finding broken links on your web site can be accomplished by either a downloadable program such as Xenu Link Sleuth, or by using a [...]...
- Referrer Spam
When a user follows a link from WebSite A to WebSite B, it generates a logfile entry in the web server logs of WebSite B. Most webmasters use a web site statistics reporting tool such as AWStats or Webalizer. Some webmasters (either purposefully or unintentionally) make the reports generated by these tools publicly available. One [...]...




