The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Web Design
    4. How to serve a Mobile & Full Site using one URL?

    How to serve a Mobile & Full Site using one URL?

    Web Design
    8 3 2.2k
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • petecampbell-bmi
      petecampbell-bmi last edited by

      Hello,

      Does anyone know of any resources or tutorials that outline how to serve a smartphone-formatted website using the same URL as the full site?

      I know that one solution is using media-queries to serve a seperate CSS stylesheet, but you still have the full HTML source code. In other words, I might want to serve a smartphone & desktop user different content, but under one URL.

      WP Touch (Wordpress Plugin) is a perfect example of what I mean, but how is it technically achieved? It serves two different sets of HTML for smartphone & full, but using one URL

      http://www.bravenewcode.com/store/plugins/wptouch-pro/

      1 Reply Last reply Reply Quote 0
      • Vivamedia
        Vivamedia last edited by

        Hi Pete!

        Take a look in Googles SEO guide on page 26, http://static.googleusercontent.com/external_content/untrusted_dlcp/www.google.com/en//webmasters/docs/search-engine-optimization-starter-guide.pdf

        Good luck!

        petecampbell-bmi 1 Reply Last reply Reply Quote 0
        • petecampbell-bmi
          petecampbell-bmi @Vivamedia last edited by

          Hi Tommy,

          This doesn't provide any technical answers unfortunately, and refers to mobile devices as opposed to smartphones. Googlebot-mobile is designed for WAP/iMode etc. style websites, Google on smartphones, tablets etc. displays the same results as the desktop version.

          1 Reply Last reply Reply Quote 0
          • AlanMosley
            AlanMosley last edited by

            I have a few examples. i used the tag in the head section of the html.
            Along with Media css see below. you slip this css into your normal css sheet, and give an alternitive css inside for phones,
            if you look at one of my sites http://perthseocompany.com.au/ i have done like this you will notice that when the screen size goes below 850px it then takes on the alternative css. One of the main things you will want to do is make sections of your website line up verticly under the alternitive. You can do this by using float left and float right in normal site and float none in alternative css.
            I do not have my site perfect because i have not yet had the time. but you get the general idea by playing with browser width.
            Note the max-width: 850px in css, this is the width at witch the css changes

            @media only screen and (max-width: 850px)
            {

            header .float-left, header .float-right
                {
                    float: none;
                }
            }

            petecampbell-bmi 1 Reply Last reply Reply Quote 0
            • petecampbell-bmi
              petecampbell-bmi @AlanMosley last edited by

              Hi Alan,

              As mentioned. I'm not looking for a CSS solution, but rather a HTML one where different HTML is served if the user-agent is a smartphone.

              CSS Media Queries can work in some situations, but not for all. For example, taking the following page - http://www.flybmi.com/bmi/en-gb/index.aspx - and using a mixture of CSS and display none; to output http://www.flybmi.com/mobile would result in a mobile site full of hidden/wasted code.

              AlanMosley petecampbell-bmi 3 Replies Last reply Reply Quote 0
              • AlanMosley
                AlanMosley @petecampbell-bmi last edited by

                Then of cause you would need to use a server side solution, this is quite simple in therory, all you need to do is get the severvariable HTTP_USER_AGENT to detect the browser, but then there would be a lot of different serveragenst to detect and more in the future. It would also be a pain having to generate html via server script for every page. I tried doing that for Netscape 2 and IE2 but gave up, it was too much work. Back in those days the way of doing things in browsers was completely different untill IE won out.

                I think the eay i was saying is much easier, and there is no missing html, its all used on both versions just positioned different.

                1 Reply Last reply Reply Quote 0
                • petecampbell-bmi
                  petecampbell-bmi @petecampbell-bmi last edited by

                  Hi Alan,

                  Thanks very much, I agree - it likely would be easier to use media queries, but I am looking for that ultimate fix and insight on how others do it 🙂

                  1 Reply Last reply Reply Quote 0
                  • AlanMosley
                    AlanMosley @petecampbell-bmi last edited by

                    No, I am also in the process of enquiring, I program in ASP.Net MVC, and the new MVC4 comes with a few starter templates (with Visual Studio 2010), this is where i got the info i suggested.

                    I can send you a starter template if you like, you can have a look though if you like. Actualy you will need VS2010 to run it, you can down load a trial but then you may as well download MVC4 as well.

                    1 Reply Last reply Reply Quote 0
                    • 1 / 1
                    • First post
                      Last post
                    • Is it against google guidelines to use third party review sites as well as have reviews on my site marked up with schema?
                      TimHolmes
                      TimHolmes
                      1
                      5
                      1.4k

                    • New ecommerce site: Close old site and full domain redirect or keep it linking to new site?
                      GlobeRunner
                      GlobeRunner
                      0
                      3
                      371

                    • Interlinking using Dynamic URLs Versus Static URLs
                      vivekrathore
                      vivekrathore
                      0
                      5
                      336

                    • Show new mobile site to 60% users & old mobile site to 40% users
                      vivekrathore
                      vivekrathore
                      0
                      3
                      98

                    • When Site:Domain Search Run on Google, SSL Error Appears on One URL, Will this Harm Ranking
                      donford
                      donford
                      0
                      4
                      154

                    • For a real estate website, is a different mobile site warranted vs a responsive site?
                      KristinaKledzik
                      KristinaKledzik
                      0
                      7
                      221

                    • I've set up my own site which is still fairly new but I'm a bit concerned that there is a bloackage SEO wise somewhere because when I try to crawl the site on SEOmoz it only crawls one page.
                      JoshED
                      JoshED
                      0
                      7
                      219

                    • Can SEO Moz perform a full site crawl and provide a report showing all URLs within an existing domain?
                      DCondon
                      DCondon
                      0
                      7
                      904

                    Get started with Moz Pro!

                    Unlock the power of advanced SEO tools and data-driven insights.

                    Start my free trial
                    Products
                    • Moz Pro
                    • Moz Local
                    • Moz API
                    • Moz Data
                    • STAT
                    • Product Updates
                    Moz Solutions
                    • SMB Solutions
                    • Agency Solutions
                    • Enterprise Solutions
                    • Digital Marketers
                    Free SEO Tools
                    • Domain Authority Checker
                    • Link Explorer
                    • Keyword Explorer
                    • Competitive Research
                    • Brand Authority Checker
                    • Local Citation Checker
                    • MozBar Extension
                    • MozCast
                    Resources
                    • Blog
                    • SEO Learning Center
                    • Help Hub
                    • Beginner's Guide to SEO
                    • How-to Guides
                    • Moz Academy
                    • API Docs
                    About Moz
                    • About
                    • Team
                    • Careers
                    • Contact
                    Why Moz
                    • Case Studies
                    • Testimonials
                    Get Involved
                    • Become an Affiliate
                    • MozCon
                    • Webinars
                    • Practical Marketer Series
                    • MozPod
                    Connect with us

                    Contact the Help team

                    Join our newsletter
                    Moz logo
                    © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                    • Accessibility
                    • Terms of Use
                    • Privacy