homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Hardware and OS Related Technologies / Smartphone, Wireless, and Mobile Technologies
Forum Library, Charter, Moderators: bakedjake

Smartphone, Wireless, and Mobile Technologies Forum

Can I check HTTP ACCEPT header to help determine mobile devices?
Does Googlebot ever use a mobile HTTP_ACCEPT that I should worry about?

 1:11 am on Jul 18, 2010 (gmt 0)

Hello all!

Just doing some review of my coding and there is a piece of rewrite code that I am unsure of:

RewriteCond %{HTTP_ACCEPT} "text/vnd.wap.wml|application/vnd.wap.xhtml+xml" [NC]

The purpose is to detect mobile devices using a technique beyond useragent strings.

My biggest concern is around search bots. Would a Googlebot ever send a header like this and accidentally get past this check?

I want to avoid any mess or confusion in regards to my site's pages in the index. Currently I'm NOINDEX'ing all my mobile pages, but I also don't want to send the non-mobile googlebot into my mobile site by accident.

Does anyone see any problems with using the above header check along with user-agent checks for determining mobile devices hitting my site?




 2:04 am on Jul 18, 2010 (gmt 0)

I'd suggest that you add a negative-match RewriteCond to exclude all known non-mobile 'bots by user-agent then, because who knows if the major 'bots may decide to put one or both of those MIME-types in their Accept headers.

Accept Headers are good for determining that a user-agent can handle a specific type of content, but not so useful for determining "what kind of device the user-agent actually is."



 4:17 am on Jul 18, 2010 (gmt 0)

Great idea! I really only care about the big three. Thanks Jim.

This mobile thing is giving me headaches. Everyone seems to have a different opinion on best practices. One confusing thing is whether to NOINDEX all the mobile pages. That makes sense until you think about the mobile googlebot crawler. Are we shooting ourselves in the foot by telling the mobile crawler not to index the pages as well? In my mind there should be only one set of my pages in the index. Mobile is just a different presentation of the pages. My stance right now is NOINDEX and submit a mobile sitemap.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Hardware and OS Related Technologies / Smartphone, Wireless, and Mobile Technologies
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved