Forum Moderators: not2easy

Message Too Old, No Replies

Internal links in m subdomain

Use m.example.com or www.example.com?

         

SilverSpirit

11:09 pm on Jan 2, 2016 (gmt 0)

10+ Year Member Top Contributors Of The Month



I have several websites built as "adaptive". If the user's browser is over 800px, they see the www.example.com version of the site (canonical); if the browser is under 800px, they see the m.example.com version of the site.

That is defined by a javascript in the head tag.

All internal links are absolute links.

Question: in the "m" subdomain, should I point my internal links (including the link to the homepage) to m.example.com or to www.example.com?

If I point them to www.example.com, the user will automatically be redirected to m.example.com from their mobile, and he / she will reach the intended page anyway.

If I point them to m.example.com, this may confuse search engines and desktop users who are being sent a link to my site by a mobile user.

What is the consensus?

Andy Langton

8:51 pm on Jan 12, 2016 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The set-up you have sounds a little unusual. Redirecting based on screen size might not be very reliable (do desktop users who resize their browsers get redirected to the mobile version?).

You would typically have a canonical attribute on the 'm' subdomain pointing to the www version, which would sort out that aspect of things. I would also suggest linking to the m subdomain if that's what the user is browsing. If you're redirecting mobile users with javascript, this is likely to be significantly slower than linking users directly to the right page.

My preferred set-up is to have an HTTP redirect both ways - desktop users on mobile get redirected to desktop, mobile users on desktop get redirected to mobile (with a 'view full version' link).