Skip to main content
Tweeted twitter.com/#!/StackWebmasters/status/413630589020151808
Better Title and added Note3
Source Link

Is Will "jailing" a single page intoinside an Iframe bad for SEOiframe using a JavaScript redirect be considered as cloaking?

Background
I have a website that uses Iframesiframes to display content. If the URL to a content is called directly by the user it should be "jailed" into the main page.
The main page provides a header and a footer as well as the navigation menu. There is one Iframeiframe named contentframe. All links in the navigation (and footer and stuff) target this frame.

My Solution for "jailing"
First I find out whether the page is already jailed via JavaScriptjavascript (that's simply done with something like var jailed = (window.self != window.top); where jailed will be true if the page is "jailed" already.
Next I redirect (using JavaScriptjavascript) to the main page with a parameter called referrer passing it the URL of the page which should get "jailed". This PHP script reads this parameter and sets it as the src argument of the Iframeiframe.
This way the main page is loaded within the Iframeiframe.

This way I can directly link to a content and after only one reload everything will be displayed just fine. But I have questions regarding some issues.

My Questions

  1. Are there SEOseo problems?
    I think, that Googlegoogle can index the contents of my site (links provided at least by the sitemap.xmlsitemap.xml and of course through the navigation links). But what about this JavaScriptjavascript redirect? It's not cloaking, but is it problematic? Will Google punish me for that somehow?
    I found out, that it's hard to find some info material for this topic.

  2. What about best practices?
    I know how to do what I want to do technically, but how about best practices? I couldn't find anything so far, but maybe some of you had to deal with that. Or is my solution perfectly fine?

Note1
I know Iframesiframes are not a very elegant way for displaying the content (from the same domain), but I'm stuck with it and I must deal with it, so please no "do not use Iframesiframes comments" :-)

Note2
Please, no opinions. I'm quite sure there are some facts on how to do this the best way.

Note3
The following link describes that the intent is very important. In a way I'm showing different content to GoogleBot than to my user, technically. But the content really stays the same only it is decorated a bit. But what does GoogleBot say? Cloaking and/or Sneaky Redirects

Is "jailing" a page into an Iframe bad for SEO?

Background
I have a website that uses Iframes to display content. If the URL to a content is called directly by the user it should be "jailed" into the main page.
The main page provides a header and a footer as well as the navigation menu. There is one Iframe named contentframe. All links in the navigation (and footer and stuff) target this frame.

My Solution for "jailing"
First I find out whether the page is already jailed via JavaScript (that's simply done with something like var jailed = (window.self != window.top); where jailed will be true if the page is "jailed" already.
Next I redirect (using JavaScript) to the main page with a parameter called referrer passing it the URL of the page which should get "jailed". This PHP script reads this parameter and sets it as the src argument of the Iframe.
This way the main page is loaded within the Iframe.

This way I can directly link to a content and after only one reload everything will be displayed just fine. But I have questions regarding some issues.

My Questions

  1. Are there SEO problems?
    I think, that Google can index the contents of my site (links provided at least by the sitemap.xml and of course through the navigation links). But what about this JavaScript redirect? It's not cloaking, but is it problematic? Will Google punish me for that somehow?
    I found out, that it's hard to find some info material for this topic.

  2. What about best practices?
    I know how to do what I want to do technically, but how about best practices? I couldn't find anything so far, but maybe some of you had to deal with that. Or is my solution perfectly fine?

Note1
I know Iframes are not a very elegant way for displaying the content (from the same domain), but I'm stuck with it and I must deal with it, so please no "do not use Iframes comments" :-)

Note2
Please, no opinions. I'm quite sure there are some facts on how to do this the best way.

Will "jailing" a single page inside an iframe using a JavaScript redirect be considered as cloaking?

Background
I have a website that uses iframes to display content. If the URL to a content is called directly by the user it should be "jailed" into the main page.
The main page provides a header and a footer as well as the navigation menu. There is one iframe named contentframe. All links in the navigation (and footer and stuff) target this frame.

My Solution for "jailing"
First I find out whether the page is already jailed via javascript (that's simply done with something like var jailed = (window.self != window.top); where jailed will be true if the page is "jailed" already.
Next I redirect (using javascript) to the main page with a parameter called referrer passing it the URL of the page which should get "jailed". This PHP script reads this parameter and sets it as the src argument of the iframe.
This way the main page is loaded within the iframe.

This way I can directly link to a content and after only one reload everything will be displayed just fine. But I have questions regarding some issues.

My Questions

  1. Are there seo problems?
    I think, that google can index the contents of my site (links provided at least by the sitemap.xml and of course through the navigation links). But what about this javascript redirect? It's not cloaking, but is it problematic? Will Google punish me for that somehow?
    I found out, that it's hard to find some info material for this topic.

  2. What about best practices?
    I know how to do what I want to do technically, but how about best practices? I couldn't find anything so far, but maybe some of you had to deal with that. Or is my solution perfectly fine?

Note1
I know iframes are not a very elegant way for displaying the content (from the same domain), but I'm stuck with it and I must deal with it, so please no "do not use iframes comments" :-)

Note2
Please, no opinions. I'm quite sure there are some facts on how to do this the best way.

Note3
The following link describes that the intent is very important. In a way I'm showing different content to GoogleBot than to my user, technically. But the content really stays the same only it is decorated a bit. But what does GoogleBot say? Cloaking and/or Sneaky Redirects

rewrite title, add capitalization
Source Link
Stephen Ostermiller
  • 99.4k
  • 18
  • 141
  • 364

Best Practice of Is "jailing" a page into an iframe (what about seo)Iframe bad for SEO?

Background
I have a website that uses iframesIframes to display content. If the URL to a content is called directly by the user it should be "jailed" into the main page.
The main page provides a header and a footer as well as the navigation menu. There is one iframeIframe named contentframe. All links in the navigation (and footer and stuff) target this frame.

My Solution for "jailing"
First I find out whether the page is already jailed via javascriptJavaScript (that's simply done with something like var jailed = (window.self != window.top); where jailed will be true if the page is "jailed" already.
Next I redirect (using javascriptJavaScript) to the main page with a parameter called referrer passing it the URL of the page which should get "jailed". This PHP script reads this parameter and sets it as the src argument of the iframeIframe.
This way the main page is loaded within the iframeIframe.

This way I can directly link to a content and after only one reload everything will be displayed just fine. But I have questions regarding some issues.

My Questions

  1. Are there seoSEO problems?
    I think, that googleGoogle can index the contents of my site (links provided at least by the sitemap.xmlsitemap.xml and of course through the navigation links). But what about this javascriptJavaScript redirect? It's not cloaking, but is it problematic? Will Google punish me for that somehow?
    I found out, that it's hard to find some info material for this topic.

  2. What about best practices?
    I know how to do what I want to do technically, but how about best practices? I couldn't find anything so far, but maybe some of you had to deal with that. Or is my solution perfectly fine?

Note1
I know iframesIframes are not a very elegant way for displaying the content (from the same domain), but I'm stuck with it and I must deal with it, so please no "do not use iframesIframes comments" :-)

Note2
Please, no opinions. I'm quite sure there are some facts on how to do this the best way.

Best Practice of "jailing" a page into an iframe (what about seo)

Background
I have a website that uses iframes to display content. If the URL to a content is called directly by the user it should be "jailed" into the main page.
The main page provides a header and a footer as well as the navigation menu. There is one iframe named contentframe. All links in the navigation (and footer and stuff) target this frame.

My Solution for "jailing"
First I find out whether the page is already jailed via javascript (that's simply done with something like var jailed = (window.self != window.top); where jailed will be true if the page is "jailed" already.
Next I redirect (using javascript) to the main page with a parameter called referrer passing it the URL of the page which should get "jailed". This PHP script reads this parameter and sets it as the src argument of the iframe.
This way the main page is loaded within the iframe.

This way I can directly link to a content and after only one reload everything will be displayed just fine. But I have questions regarding some issues.

My Questions

  1. Are there seo problems?
    I think, that google can index the contents of my site (links provided at least by the sitemap.xml and of course through the navigation links). But what about this javascript redirect? It's not cloaking, but is it problematic? Will Google punish me for that somehow?
    I found out, that it's hard to find some info material for this topic.

  2. What about best practices?
    I know how to do what I want to do technically, but how about best practices? I couldn't find anything so far, but maybe some of you had to deal with that. Or is my solution perfectly fine?

Note1
I know iframes are not a very elegant way for displaying the content (from the same domain), but I'm stuck with it and I must deal with it, so please no "do not use iframes comments" :-)

Note2
Please, no opinions. I'm quite sure there are some facts on how to do this the best way.

Is "jailing" a page into an Iframe bad for SEO?

Background
I have a website that uses Iframes to display content. If the URL to a content is called directly by the user it should be "jailed" into the main page.
The main page provides a header and a footer as well as the navigation menu. There is one Iframe named contentframe. All links in the navigation (and footer and stuff) target this frame.

My Solution for "jailing"
First I find out whether the page is already jailed via JavaScript (that's simply done with something like var jailed = (window.self != window.top); where jailed will be true if the page is "jailed" already.
Next I redirect (using JavaScript) to the main page with a parameter called referrer passing it the URL of the page which should get "jailed". This PHP script reads this parameter and sets it as the src argument of the Iframe.
This way the main page is loaded within the Iframe.

This way I can directly link to a content and after only one reload everything will be displayed just fine. But I have questions regarding some issues.

My Questions

  1. Are there SEO problems?
    I think, that Google can index the contents of my site (links provided at least by the sitemap.xml and of course through the navigation links). But what about this JavaScript redirect? It's not cloaking, but is it problematic? Will Google punish me for that somehow?
    I found out, that it's hard to find some info material for this topic.

  2. What about best practices?
    I know how to do what I want to do technically, but how about best practices? I couldn't find anything so far, but maybe some of you had to deal with that. Or is my solution perfectly fine?

Note1
I know Iframes are not a very elegant way for displaying the content (from the same domain), but I'm stuck with it and I must deal with it, so please no "do not use Iframes comments" :-)

Note2
Please, no opinions. I'm quite sure there are some facts on how to do this the best way.

Source Link

Best Practice of "jailing" a page into an iframe (what about seo)

Background
I have a website that uses iframes to display content. If the URL to a content is called directly by the user it should be "jailed" into the main page.
The main page provides a header and a footer as well as the navigation menu. There is one iframe named contentframe. All links in the navigation (and footer and stuff) target this frame.

My Solution for "jailing"
First I find out whether the page is already jailed via javascript (that's simply done with something like var jailed = (window.self != window.top); where jailed will be true if the page is "jailed" already.
Next I redirect (using javascript) to the main page with a parameter called referrer passing it the URL of the page which should get "jailed". This PHP script reads this parameter and sets it as the src argument of the iframe.
This way the main page is loaded within the iframe.

This way I can directly link to a content and after only one reload everything will be displayed just fine. But I have questions regarding some issues.

My Questions

  1. Are there seo problems?
    I think, that google can index the contents of my site (links provided at least by the sitemap.xml and of course through the navigation links). But what about this javascript redirect? It's not cloaking, but is it problematic? Will Google punish me for that somehow?
    I found out, that it's hard to find some info material for this topic.

  2. What about best practices?
    I know how to do what I want to do technically, but how about best practices? I couldn't find anything so far, but maybe some of you had to deal with that. Or is my solution perfectly fine?

Note1
I know iframes are not a very elegant way for displaying the content (from the same domain), but I'm stuck with it and I must deal with it, so please no "do not use iframes comments" :-)

Note2
Please, no opinions. I'm quite sure there are some facts on how to do this the best way.