htaccess-spam-blacklist-block
This file is created to collect and prevent referral spam traffic sources.
Referral spam has been spread wide across the web. Add this to your .htaccess or config file on a Apache or Nginx server to prevent referral spam traffic from websites like semalt & buttons-for-websites. This file is usually found in the root “public_html” folder of your website.
NOTE: This method doesn't stop the Analytics referral spam (because they are hitting Analytics directly and not even touching your website / server). You should also use filters in Analytics to prevent referral spam.
Other options for Google Analytics
If this method fails you can prevent referral spam by:
Contributing
If you'd like to help, just fork the repository, then add useful stuff and send a pull request.