What is the best way to optimize iframe content on a web page for search engines

I am using iframe on my site,

How can I let the search engine robots read and index the content and the results point to the page including the iframe?

thanks.

+2


a source to share


2 answers


As far as I can tell from multiple google searches, searching for the text contained in the iframe only returns the iframe page, not the wrapper page. This way the content of the iframe is not indexed on the wrapper page.



You should try to find a workaround for the iframe if possible. If you just want "scrollable" content, you can use a div with CSS overflow:scroll

. Or just read the external content from the server side and include it in the line with the page.

+3


a source


  • optimize text in iframe-container-page and de-optimize text in iframe-content-page. use the title property of the iframe and insert alternate content between the opening and closing iframe tags.
  • add javascript to iframe-content-page to check if it's loaded offline, redirect to iframe-container-page if not:

    if (self.location == top.location) top.location.replace (' http://contain.er/page-url/here ');

  • Optional (but I wouldn't recommend it) you could add the iframe-content page to your robots.txt file and declare it not indexable:

    User agent: * Disallow: /iframe-content-page.html



0


a source







All Articles