Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My website keeps getting hijacked by searchportal.information it looks like they are using an iframe script to do it. here is the script (link doesn't work anymore):

how do I prevent them from including my site/content on an iframe on their site?

share|improve this question

migrated from stackoverflow.com Mar 4 '11 at 4:04

This question came from our site for professional and enthusiast programmers.

Use a frame breaker script:

<script type="javascript">

share|improve this answer

One of the best ways to prevent framing, is to use a rule on your .htaccess, like so

<IfModule mod_headers.c>
        Header always append X-Frame-Options SAMEORIGIN

This method doesn't rely on JavaScrpit being active or not but on the support of the X-Frame-Options header. It is not an Internet Standard, but it is quite well supported as of February 2014

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.