Welcome to WebmasterWorld Guest from

Forum Moderators: bakedjake

Message Too Old, No Replies

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)

WebmasterWorld Senior Member 10+ Year Member

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)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

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)

WebmasterWorld Senior Member 10+ Year Member

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.

Featured Threads

Hot Threads This Week

Hot Threads This Month