Please supply link to your site, I can have a look and see if I can help. It will all depend where the iframe is pointing to, maybe another site/domain? If that is the case, search engines index the original site, not the page where it is framed into.
Kraai
Senior Poster
3,981 posts since Feb 2008
Reputation Points: 76
Solved Threads: 87
Hi,
blocking the page in the robots.txt and preventing the pages to be listed using the meta tag <meta name="robots" content="NoIndex, NoFollow" /> is in some cases not enough. You can use a javascript to prevent the page within the iframe to be displayed as the top window. In this case the search engine may show your page, but once a user clicks on the page, he finds your page within the desired index.htm.
You can use the following code:
<script language="javascript">
if (parent.location.href == self.location.href) {
window.location.href = 'default.asp';
}
</script>
The above code would make the homepage appear each time. To prevent this, you can put a dynamic querystring in order to display the desired page:
<script language="javascript">
if (parent.location.href == self.location.href) {
window.location.href = 'default.asp?iframe_page='+self.location.href;
}
</script>
Good luck,
Ali Baradaran
Baradaran
Junior Poster in Training
88 posts since Feb 2007
Reputation Points: 11
Solved Threads: 7