Prevent Hot Linking

Just a quick tip to prevent hot linking to the items on your blog. Saves bandwidth and prevent others from embedding images on your site in their blogs.

Add the following code to the .htaccess file at the root of your site.

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?YourDomain.com/.*$ [NC]
RewriteRule .(gif|png|jpg)$ - [F]

«
»
Michael Lewis

Michael Lewis is the founder of Wi-Phye Consultants LLC, a Cleveland OH based Local SEO agency and Web Design Firm servicing clients all over Ohio and the nation. You can contact him on Facebook, Google+, Twitter, LinkedIn or by email.