Sign up ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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 Mar 4 '11 at 4:04

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

2 Answers 2

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.