Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

My site (using Django) has an app that I'm trying to push - I currently have a piece of middleware that redirects the user to a page advertising the app if they're accessing the page on the iPhone, then setting a cookie so that the user isn't bugged by the message every time they visit the site. This works fine, however checking the page with the mobile Googlebot checker shows that the Googlebot gets stuck in the redirect (since it doesn't store cookies) and therefore won't index the proper content.

So, I'm trying to think of an alternative implementation that won't hurt the site's Google ranking and won't have any other adverse effects. I've considered a couple of options:

  • Redirect (the current solution), but don't redirect if the user agent matches the Googlebot's UA string. This would be ideal, however I'm not sure if Google like their bot being treated differently from other users, and I'm afraid the site's ranking may be somehow penalised if I go ahead with this.
  • Use a JavaScript popup instead of a redirect. This would make sure the Googlebot finds the content it needs, however I envision this approach causing compatibility issues with the myriad mobile devices/browsers out there, and may affect the page load time.

How valid are these options? And is there a better option for implementing this feature out there? I've tried researching this topic but surprisingly can't find any reputable-looking blog posts that explore this topic.

share|improve this question

migrated from serverfault.com Oct 23 '13 at 16:04

This question came from our site for professional system and network administrators.

add comment

2 Answers 2

If you were to use a redirect, Googlebot may not be happy.

As is described here, Google is not fond of web servers displaying different content to users and crawlers. It refers to these practices as "Cloaking" and "Sneaky redirects". Although your intentions are good in this situation, you may be penalised for redirecting Googlebot to a different page than that one it requested.

As you mentioned that your app is for iOS, you could use an alternative method of alerting your users to its existence. Apple's own Smart App Banners provide a nice way of doing so. You've probably seen these at some point, they appear at the top of a page and provide a thumbnail image of the app and a link to its page on the app store. Some advantages of using a Smart App Banner:

  • It's as simple as adding a meta tag to the head of your pages
  • Apple implemented consistency and compatibility
  • Will only appear to Safari users
  • Will not affect Googlebot one bit
  • Much less disruptive compared to a redirect or pop-up.
share|improve this answer
add comment

If the content seen by googlebot is the same as it would be if it could get past the re-direct, I think that your "ideal" solution should be just fine.

Google cares about providing a good and predictable experience for its users - you visitors. So as long as the content is what Google caches, you should be fine.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.