5

I've had a look through this site and found several similar questions but none which address my current needs.


Normally I create responsive sites but on occasion I will create a 'desktop' and a 'mobile' site.

These sites use the same content from the same database but this is served different in html.

I use browser detection to determine which html is served. I realise that it is arguable whether these two constitute separate 'sites' but this is the term I shall be using for this question.

My current preference is to keep the url exactly the same between the two sites. No prefix or suffix like m. or .mobi

Apart from domain cookies / session I don't know what else could be affected by this though. Since lots of sites out there use, for example, m. I assume there is some benefit. Can anyone please shed some light on why this might be?

If I had separate content then I would probably feel m. was appropriate but since it is exactly the same content and hierarchy I don't see the point.

Additionally the single url allows for easy sharing cross device (mobile to desktop).

So what, if any, are the benefits of using a separate url for a mobile site where the mobile and desktop version share the same content?

To be be clear, there is a way to view the desktop site on a mobile using a link. Additionally I can make it work so that appending /mobile/ or prepending m. would return the mobile version but the addition would not persist through the site.

EDIT

I should have made this clear before. I am using a CMS with a url rewriter built in (in fact it is always used, regardless of how many sites you have, to create friendly urls). Due to the nature of the sites I make, cookies are unavoidable.

1
  • +1 for "the single url allows for easy sharing cross device". That is my main pet peeve with the mobile-only subdomain approach. Commented May 7, 2014 at 12:14

5 Answers 5

5

Personally I am a fan of the one domain approach like you are doing but just thought I would also provide few more considerations to add to the already good advice given by others here.

  • SEO is a major reason for going with two domains OR one. Two domains = two seperate marketable sites and one can be posted in app market places. On the other hand you're seperating your link juice and ranking and getting into possible duplicate content issues. Like one user said about dupe content, it's easy to combat with canonical tags and on page links to mobile/desktop version. Canonical tags are a Google invention and I'm not sure how many other search engines (if any) have adopted it.
  • Googlebot doesn't use cookies/sessions to crawl your site. And user agent strings are useless in many situations. This is where those on page /mobile-version links come in handy.
  • mobile detection can be difficult and flacky and needs to be updated. Secondly when a new device comes out tomorrow you need to alter your detection code. A secondary m. or .mobi domain doesn't since it was built for this.
  • Some webmasters want google to index their mobile domain seperately in google mobile search. They specifically want to rank a site or section of their site differently.
  • some webmasters want to market two sites diferently, and serve different ADs. Also adding extra inventory for media buyers.
  • Web Performance Optimization can be easier to do for seperate web app then a responsive one or one that loads different design.
  • some webmasters want to put their mobile site/app into a mobile app marketplace (Yeah even though it is just an html site and not an app people do it anyway.). You can't really do this unless you have (m. or .mobi or /mobile).
  • For some markets, and the masses of visitors that visit them, are more comfortable and understand better a mobile site url. GO TO http://mobile.bluewidget.com Today! which can make sense to a non savvy person as OH I didn't know I can visit this site on my iPhone too! and are more likely to now try it on their phones or tablets.
  • Google has mobile specific sitemap.xml
  • Search Engines, like Google, can treat mobile sites differently. This is also a major difference, just because you made your site work in 320pixels does not mean it is a mobile website or will work on all mobile devices. It is great for modern smartphones but as that document explains there are still phones out there that can benefit from building separate sites using (older) standardized mobile technology.
0
4

Aside from SEO, one issue is what the Url 'looks' like when people use/print/send it around. If you're going to redirect people to m when they go to www if they're on a mobile device, and redirect people to www from m when they're not, then what have you achieved by using separate domains?

AFAIK, there are no benefits. But the reason people have decided to use m. and www. domains in the past is because either:

  • They aren't using only css media queries to change their desktop version in to their mobile version, or;
  • Their server platform can't send different markup to mobile than non-mobile devices.

If you can use either of the above methods, I do not see a benefit for using separate domains.

1
  • This is my current view - hooray! I'm asking the question really because it's so prevalent I feel there must be a benefit somewhere. Anyway, thanks for your response! Commented Jul 24, 2012 at 9:37
2

Interesting question.

Google can read your site regardless of detection - so which one gets indexed? The mobile or desktop version? And how do you ensure that it doesn't appear as spam!?

By having 2 URL's, and providing the page is rendered pretty differently (and content is displayed differently) then you should not be seen as spamming the new URL (eg m.domain.com)... the subdomain plus any additional meta data should be enough to inform the search engine this is for a mobile browser.

If you use one site and 'platform' detection, pass it to a session/cookie and then display content accordingly I think
1) maintenance is hard and
2) what happens if the browser doesn't support cookies? I believe in sessions use cookies just to keep track of the visitor (although all 'content' is saved on the server). You will need a way to let them select the 'light' version of your site (the mobile version)

Further more, what happens if I want to choose to view the desktop version or mobile version as you asked - having to rely on cookies may make the user annoyed (if the user has them turned off or has to click a link to get what should be the default choice for platform) and your debugging fiddly.

So to answer your question, you can have it any way you want! Prefix with an m. or use the appending folder /mobile/ or anythings else or even all the above.

If it were me, I'd use the 2 domain (www. and mobile.)

1
  • Thanks for the answer. I've updated my question to reflect some of the issues you've raised here. Definately food for thought though so +1 :) Commented Jul 24, 2012 at 8:08
2

In addition to the other answers, there are a few stumbling blocks along the way:

Problems

  1. Search engines don't like when you have duplicate content on the same domain. If the exact same post appears in two different locations on your domain, your search ranking suffers.

  2. How do you detect the platform? UserAgent-based scripts? Unreliable. Cookies? Illegal, without consent (according to EU laws).

Solutions

  1. A simple Canonical tag to your desktop version should do the trick.

  2. Depending on your server, it could be very easy to do a url rewrite. That said, I highly suggest the responsive design.

    The technique is well-supported but my favorite aspect is that most modern browsers don't retrieve DOM resources for elements they don't render. For example, I embedded a YouTube video (iframe) in my site; my desktop css says "display: block" whereas mobile css says "display: none". Browsers using the mobile css won't ping youtube.com since it's not in the active DOM, ergo the iframe is viewed as arbitrary text when on a mobile platform.

Is it worth it?

Personally, I would find it much less cumbersome to adhere to a media query for screen size.

Url rewrites can be successful, but it all comes down to detecting the platform in the first place. I'm sure you could write some javascript to detect certain browser features, then redirect based on results, but how would you pass that information? The point is, you can jump through all of these hoops to create a separate site, and perhaps the few Kb of saved bandwidth is worth it, but your time would be better spent elsewhere.

1
  • 1
    +1 Thanks for your response! Responsive design is my default position but if it's not an option, for whatever reason, how best should we approach separate sites? The canonical tag is certainly important when you have separate domains and, for me, makes separate domains an option. But it is no better than having the same url. Assume it is equally easy to have separate domains or dynamic redirecting - which is better? As far search engine ranking Google says dynamic serving is fine. That UA checks can be unreliable is true - but I'd use them from separate domains anyway Commented Jul 24, 2012 at 9:34
1

you will need to give google anotations to indicate the m.yoursite.com/page is the mobile version of www.yoursite.com/page

you must read this post from google webmasters blog about how to configure a website that serves a different content to different devices

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.