Prevent iframe in page from being indexed

oli22

New Member
Installed an <iframe> hosted on same url in webpage template,
iframe is not from anotherother site.
I dont want search engines to index it because
this iframe not relevant on its own.

Is robots.txt
User-agent: *
Disallow: /

Good enough to prevent search engines from indexing the iframe ?

is there another thing i can do for preventing users to access iframe from being seen if user
types iframe url? Remember ifame must still open in main template
 
Last edited:

disenoweb

New Member
Installed an <iframe> hosted on same url in webpage template,
iframe is not from anotherother site.
I dont want search engines to index it because
this iframe not relevant on its own.

Is robots.txt
User-agent: *
Disallow: /

Good enough to prevent search engines from indexing the iframe ?

is there another thing i can do for preventing users to access iframe from being seen if user
types iframe url? Remember ifame must still open in main template

with that you will disallow robots on the whole side! be carefull what you write exactly in the robots archive.

I think a meta tag should work too. Iframes normaly arent a problem, their are many sites who use them to include functions of other websites, for example a flightsearch etc.

Even Facebook uses iframes for personal tabs on fanpages.
 

oli22

New Member
Wow somebody answered my thread, refreshing to find a forum that actually answers back, it makes me click back(resonably)...

disenoweb:
with that you will disallow robots on the whole side! be carefull what you write exactly in the robots archive.
Really? even with the robots only in the sub-folder with iframe will disallow full site?
Absolution:
On a side note, my suggestion is never to use iframes or frames unless it is literally the last resort!
--> Well its already acting buggy, check my new thread:
http://www.webdesignforum.com/16171-iframe-not-always-appearing-page.html#post66052


Thanks, i also found this nice javascript to re-direct iframe to main parent if user where to try to type the iframe url:

<SCRIPT LANGUAGE='javascript'>try { if (top == self) {top.location.href='test.html'; } } catch(er) { } </SCRIPT>
 
Last edited:
Top