IFrame and SEO Questions

I have a website. There are some pages created with iframes to show the contents of the page, rather than a flat, normal page. The reason is that before and after my content I show the header and footer (some logos + basic html) of some other sites that I cannot change and use iframes to prevent css problems (when the css header and footer will override css from my pages). SEO problem: search engines do not like iframes. How can I solve this problem?

Example:

I have a website: www.site1.com, where all pages are flat (without an iframe).

There is also www.othersite.com that contains:

  • [header]
  • IFrame [My Content]
  • [footer]

and I have full access to the contents of www.othersite.com, except for the html header and footer.

How can I make my content on www.othersite.com accessible to search engines?

+4
source share
2 answers

This is a pretty bad situation.

If this is for any serious project, you need to abandon this iframe problem and just get rid of them.

Not that search engines cannot use iframes, they can, but they index what is inside the iframe, which in your case is similar to www.site1.com.

To get another site in the search engines without deleting the iframe is possible, but you will have to make a decision.

Idea

Put the URL on your iframe (othersite.com) so that it serves all the pages from site.com. Use URL redirects without redirecting URLs so that the page appears on another .com site.

Add a sitemap to othersite.com so that Google can find all of these pages.

Decision

To prevent Google from thinking that othersite.com is just a clown site1.com, you will have to block site1.com from search engines.

Block your website1.com from indexing with robots.txt

This means that any Google juice you score, such as page rank or domain aging, etc., will be lost. If this is a business that depends on search engines for business, you should think about it.

Conclusion

I have never tried this technique from my simple idea, which I had to solve your problem.

This is not a very pleasant solution, not what you need to do (if anyone else is reading this).

The best solution is to get rid of your frames. If you have problems with the inability to control html inside the header and footer frames, then there are even better solutions than using an iframe.

For example, you can use HtmlAgilityPack to parse in the html that should be in these headers and spit it out into your template with changed identifiers so that you can contain css.

+2
source

You can use meta tags and a title tag to help search engines recognize the content of your page.

<meta name="description" content="Longer description of the content in the iframe"> <meta name="keywords" content="keyword1,keyword2,keyword3,foo,boo"> <title>Title of the page in the iframe</title> 

There is also the option to insert alternative content in the iframe tag. This will be analyzed by search engines and will only be displayed if iframes are disabled.

 <iframe src="http://www.site1.com">Alternative content for SE and disabled iframes</iframe> 

I think the best solution is to separate the CSS header, footer and content by encapsulating the parts in containers and selecting them only through the container identifier and then getting rid of the iframe.

 #header div.foo {/* some CSS here */} #content div.boo {/* some CSS here */} #footer div.moo {/* some CSS here */} 
-2
source

Source: https://habr.com/ru/post/1299337/


All Articles