views:

224

answers:

3

I have created a mobile version of a my website which is a one-page webapp. I'm working with php server side and js+jquery on the front end.

  1. how can i auto-redirect mobile browsers to the mobile web-app in a way that's transparent to search engines?

  2. should i allow only mobile bots on the mobile site? (with robots.txt)

  3. do i need to flag that the web-app is pure duplicated content from the actual site?

A: 

You should use a 301 redirect from each page to the corresponding mobile page. I'm not sure about the other two questions, maybe someone else can provide a better answer.

A. M.
i would need to redirect **all** the pages to the corresponding **part of** my web app (as single paged). however how should i do this, with PHP?
Haroldo
Use a .htaccess file for this. I don't know how you access the different parts of your app, but I'm assuming assuming you use a hashtag; I also don't know what your urls look like, so I'm assuming your regular urls are something like site.com/section and your mobile version is m.site.com/#section. The redirect would be something like this: RewriteCond %{HTTP_USER_AGENT} "symbian|nokia|other-user-agents" redirectMatch 301 ^([\w]+)$ http ://m.site.com/#$1
A. M.
cool, this would work. Any thoughts on what i should do for googlebot(s) as every page redirecting to the same page(+hash) could look a bit suspect?
Haroldo
Honestly, I've never has a mobile version with just one page, so I can't tell you from personal experience. At this link http://googlewebmastercentral.blogspot.com/2009/11/running-desktop-and-mobile-versions-of.html they mention redirecting to a single page, but they only say it's a bad user experience (not your case, since you redirect to the appropriate section of the page), but they never say anything about it being bad for your ranking.
A. M.
+2  A: 

I use the PHP Class "php-mobile-detect" (or "mobileesp", which I have not used personally) to determine whether the site is being accessed from a mobile device or not. I also tend to set a SESSION variable to record the result of that test, so I am not retesting every time the user loads a page.

Personally, I also find Smarty a handy tool here, as I use it to load different templates, based on the value in the above SESSION variable.

What this then means is that, regardless of device, users visit the same URLs, interact in the same (or very similar) fashions and receive outputs best suited/styled to the device they are accessing from.

This would also mean that any risks associated with Google detecting duplicate content, etc. would be avoided, as, when the spider visits, it will just see the desktop version of your site, and index that.

Lucanos
+2  A: 

how can I auto-redirect mobile browsers to the mobile web-app in a way that's transparent to search engines?

Redirecting is already explained by other users. Redirection should be done with a serverside script.
Very interesting reading on this topic on the Offical Google Webmaster Blog: Running desktop and mobile versions of your site

should i allow only mobile bots on the mobile site? (with robots.txt)

No, allow everyone. Your DocType should be different on your mobile pages, so crawlers know you are talking about a mobile site. (Robots.txt is about exclusion not about inclusion)

You can verify this on Webmaster Central blog: Help google index your mobile site

do i need to flag that the web-app is pure duplicated content from the actual site?

No, Mobile sites are another kind of website. It's another device, so no issues with duplicate content here. But pay attention that redirection takes place from and to the "same content", other wise you might be "unintentionally cloaking" (see first link)

A last tip: check out Developing mobile sites on google Webmaster Tools

dampee
this is very interesting thanks Dampee. I'm using html5 and so the html5 doctype, are these XHTML Mobile 1.2 doctypes *still* the standard?
Haroldo
Yes it is. the mobile doctype is limited. Over the years when mobile devices will be more powerfull the mobile doctype might disappear.
dampee