Skip to content

Simple PHP code snippet to fight hotlinking when using MailPoet plugin.

License

Notifications You must be signed in to change notification settings

MadMaxInfinity/mailpoet-anti-hotlinking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

mailpoet-anti-hotlinking

Simple PHP code snippet to fight hotlinking when using MailPoet plugin (tested with 4.6.0).

When using MailPoet, you can add posts (with its featured image), woocommerce products (same thing) and any image you want to your emails. But this also means that those files must be accessible whatever directory they are in, from whatever webmail your users use. This allow hotlinking if you want to be sure everyone can read your mail and see your pictures. And Hotlinking is BAD for SEO!

To fight hotlinking, you must secure all your directories. But this way, say goodby to your pictures in your emails.

The solution is to allow just one directory tree (directory and its subdirs) and place a copy of your pictures here, and use them in your email.

To keep the ease of use of MailPoet and protect my website against hotlinking, I wrote this code snippets, using a MailPoet filter, to do so, automatically.

Enjoy, and feel free to improve!

About

Simple PHP code snippet to fight hotlinking when using MailPoet plugin.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages