javascripthttp-redirectgoogle-ranking

Google Indexing and Redirects


I have a site (I can't provide a link to it), where we're using links to generate lightboxes that have iframes to content.

We're linking to the content like so:

  <a href='/path/to/lightbox.php' onclick='generateLightbox("/path/to/lightbox.php")'>link</a>

On the page, we're using the following to forward to the main page and open up a lightbox if a user tries to access the lightbox content directly:

  <script>window.location="index.php?openLightbox=/path/to/lightbox.php"</script>

Our problem is that google is not indexing these lightbox pages. While going through the webmaster tools, it's giving a warning that a "redirect" is detected.

Is there anyway I can make sure to redirect users to the main page and open up a lightbox without tripping up google's quality checker? I believe my problem is that google is seeing the redirect and not indexing the content, yet I'm using the method I've seen suggested on a couple different resources such as this SO question: Redirects & Google Indexing


Solution

  • In the end, the only solution we could find was to detect for google bot, and not redirect.