Best way to redirect users back to the pretty URL who land on the _escaped_fragment_ one?

Posted by Ryan on Pro Webmasters See other posts from Pro Webmasters or by Ryan
Published on 2014-01-08T20:54:41Z Indexed on 2014/06/11 21:42 UTC
Read the original article Hit count: 272

Filed under:
|
|
|

I am working on an AJAX site and have successfully implemented Google's AJAX recommendation by creating _escape_fragment_ versions of each page for it to index.

Thus each page has 2 URLs:

  • pretty: example.com#!blog
  • ugly: example.com?_escaped_fragment_=blog

However, I have noticed in my analytics that some users are arriving on the site via the "ugly" URL and am looking for a clean way to redirect them to the pretty URL without impacting Google's ability to index the site.

I have considered using a 301 redirect in the head but fear that Googlebot might try to follow it and end up in an endless loop.

I have also considered using a JavaScript redirect that Googlebot wouldn't execute but fear that Google may interpret this as cloaking and penalize the website.

Is there a good, clean, acceptable way to redirect real users away from the ugly URL if for some reason or another they end up arriving at the site that way?

© Pro Webmasters or respective owner

Related posts about seo

Related posts about redirects