codeigniter - According to google my desktop site is not mobile friendly -
i have desktop view(test.com) , mobile view(m.test.com) site. redirecting mobile view through codeigniter constructor .
public function __construct(){ parent::__construct(); $this->load->library('user_agent'); if ($this->agent->is_browser()) { if($this->agent->mobile()){ $url = $_server['request_uri']; header('location: http://m.test.com'.$url); } } }
and working fine. included annotations in site main layout file.
in desktop link rel="alternate" media="only screen , (max-width: 640px)" href="http://m.test.com/"
in mobile link rel="canonical" href="http://www.test.com/"
but google still showing site not mobile friendly.
please me out.
from looking @ site is, not mobile friendly. seems miss several of following criteria:
page eligible “mobile-friendly” label if meets following criteria detected googlebot: avoids software not common on mobile devices, flash uses text readable without zooming sizes content screen users don't have scroll horizontally or zoom places links far enough apart correct 1 can tapped
source: http://googlewebmastercentral.blogspot.co.uk/2014/11/helping-users-find-mobile-friendly-pages.html
i'v tried on ie on noke phone. looks desktop site.