Skip to content

Preparing for Google’s Mobile Friendly update on April 21st, we noticed that some of our clients’ sites using the WPTouch plugin were unexpectedly failing Google’s mobile-friendly test.  Since all of the sites were hosted with WPEngine, we contacted both WPTouch and WPEngine support. After a bit of back and forth, WPEngine solved the problem by adding the following to the varnish cache for the affected sites.

set $mobile_bot 'no';
if ($http_user_agent ~* (iPhone) ) {
	set $mobile_bot "X";
}
if ($http_user_agent ~* (Googlebot) ) {
	set $mobile_bot "${mobile_bot}Y";
}
if ($mobile_bot = "XY"){
	set $is_bot 0;
}

If you’re having a similar problem passing the mobile friendly test and use WPTouch and WPEngine, try it out!

Max Elman is Razorfrog's Founder and Project Manager. He is a tech-savvy internet guru and has led Razorfrog's award-winning web design team since 2008. View Max's bio for more details.

Toggle light/dark mode

Back To Top
Razorfrog Logotype Turquoise Retina
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognizing you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

Please visit our privacy policy for more information regarding the personally identifiable information we collect and how it is used.