Forum Moderators: open

Message Too Old, No Replies

document.referrer redirect question

iframes in SERPs

         

gniver

2:49 pm on Aug 6, 2009 (gmt 0)

10+ Year Member



My client is using an iframe for some key content on their site. The parent is on a different domain than the frame.

My concern is that I expect the iframe page to rank and show up in the SERPs. Anyone arriving at the iframe page will see an unformatted page without navigation.

I was thinking of using document.referrer to add some basic navigation for anyone coming via search. What I'd rather do is redirect anyone not coming from the parent domain to the parent domain, thereby displaying the iframe for a second time.

Would this work? Would it be looked at as spam? Could you give me an example of the code?

whoisgregg

9:42 pm on Aug 14, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Essentially, you're asking for the opposite of a frame-breaking script. :)

Test this code in the framed page and see if does what you want:

if (top.location == location) {
top.location = 'http://example.com/path/to/framing/page.html';
}