For years the website structure has been Desktop with Mobile friendly site on a subdomain using this code on the desktop with canonical stated on both versions and in in the desktop sitemap.xml and I have a mobile sitemap.xml both located in the root directory.
Desktop is
!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
In the header Desktop:
link rel="alternate" media="only screen and (max-width: 750px)"
href="https://m.sample.com/page.html"
This is Javascript
<script type="text/javascript">
if (document.location.search.indexOf("skipmobile") >= 0) {
document.cookie = "skipmobile=1";
}
else if ((document.location.hostname.match(/.mobi$/) || screen.width < 750)
&& document.cookie.indexOf("skipmobile") == -1)
{
window.location = "https://m.rylexonline.com/hunter-reymaniak.html";
}
</script>
On the Mobile subdomain (HTML 5) Canonical is stated:
link rel="canonical" href="https://www.sample.com/page.html
Google is flagging Page indexing issues “Alternate page with proper canonical tag” and not indexing the DESKTOP website.
We’re currently developing a responsive website, but need to validate these pages. Is this because Google indexes Mobile pages first?
If YES – do I remove the link rel canonical from the mobile pages and also this from the DESKTOP:
link rel="alternate" media="only screen and (max-width: 750px)"
href="https://m.sample.com/page.html"
Thank you!!