Solved

Blocking access to my website by host name

Posted on 2014-12-16
3
459 Views
Last Modified: 2014-12-16
Lately I've been getting visits to my website, originating from a known spam site (7makemoneyonline.com).  I'd like to prevent that referrer from accessing my site.  I believe they may change IP address from time to time, so I'd prefer to block the host name with .htaccess    My server apparently uses Apache 2.2.22.  Please advise.
0
Comment
Question by:ddantes
  • 2
3 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
Comment Utility
This assumes they are sending the referer in the headers, if they aren't then you have to use the IP - I doubt they would be constantly changing it.

RewriteEngine on
RewriteCond %{HTTP_REFERER} 7makemoneyonline\.com [NC]
RewriteRule .* - [F]

Open in new window

0
 

Author Comment

by:ddantes
Comment Utility
Thanks Gary.  I believe they are sending the referrer in the headers, because it is appearing in my server log.   What function does ".* - [F]" accomplish?  For example, does the visitor get a message that access is denied?
0
 
LVL 58

Expert Comment

by:Gary
Comment Utility
It returns a 403 Forbidden message - i.e. you are not allowed here.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now