1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Easy 4 Step Process to Convert Your Website into a Mobile Version in Less Than an Hour

Discussion in 'BlackHat Lounge' started by seochris96, Dec 4, 2012.

  1. seochris96

    seochris96 Regular Member

    Joined:
    Jan 31, 2012
    Messages:
    331
    Likes Received:
    100
    Occupation:
    Writer, Designer, Marketer
    Location:
    2 spots away from the top of Google
    In another thread, someone asked about using 3rd party tools like Duda to create mobile websites and whether or not it was easier than making their own. Personally, I don't like relying on auto-created code because of how much unneeded crap is usually put in it. I thought it was common knowledge on how easy it is to change your site into a mobile version, but apparently it's not. Here's how you can make 1 in less than an hour.


    Step 1: Google "free mobile website template."


    Step 2: Find template of your liking, download and transfer data and images from regular site into the mobile template.


    Step 3: Enter this code into the head of your regular site:


    <script type="text/javascript">
    (function(a,b){if(/android.+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iem obile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link )|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar (ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|b umb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a |jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|e\-|e\/|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(di|rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|d o|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran |owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(4 0|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98 )|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|xda(\-|2|g)|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)))window.location=b})(navigato r.userAgent||navigator.vendor||window.opera,'http://YOURMOBILESITEADDRESS.COM');
    </script>


    Step 4: Upload your mobile version to your webhost and control your own mobile site and code without paying anyone or relying on a 3rd party.
     
    • Thanks Thanks x 2
    Last edited: Dec 4, 2012
  2. heiL86

    heiL86 Newbie

    Joined:
    Nov 15, 2012
    Messages:
    43
    Likes Received:
    6
    Thanks for sharing, for those who don't know, this is basically reading the agent data being sent and redirecting you to a specified URL.
    This could be useful when launching campaigns that pay more for mobile users :)
     
  3. jp_smith86

    jp_smith86 Senior Member

    Joined:
    Jul 6, 2012
    Messages:
    855
    Likes Received:
    340
    Location:
    DIL APNA PUNJABI
    Home Page:
    Thanks
     
  4. JimmyWong

    JimmyWong Registered Member

    Joined:
    Feb 24, 2012
    Messages:
    63
    Likes Received:
    165
    Thanks. I wonder if Google is advanced enough to interpret such a script and alter the rankings accordingly.

    I'm swaying toward a responsive site being better and more effective than a redirect. Bit of a pain/challenge when it involves large sites, such as eCommerce stores.
     
  5. seochris96

    seochris96 Regular Member

    Joined:
    Jan 31, 2012
    Messages:
    331
    Likes Received:
    100
    Occupation:
    Writer, Designer, Marketer
    Location:
    2 spots away from the top of Google
    Exactly, this isn't a responsive design, but if you find a decent template that has the proper headers (not hard to do), you can use this redirect that will display a proper looking mobile site for all of the major devices. If you just want to have something simple that works and don't want to spend extra money, this is a good way to go.
     
  6. seochris96

    seochris96 Regular Member

    Joined:
    Jan 31, 2012
    Messages:
    331
    Likes Received:
    100
    Occupation:
    Writer, Designer, Marketer
    Location:
    2 spots away from the top of Google
    I've honestly wondered that myself and I've tried to do some research on it but I have not yet come to any conclusions. What I haven't found is anything that says it will have a negative impact on your rankings. That may change in the future, though.
     
  7. JimmyWong

    JimmyWong Registered Member

    Joined:
    Feb 24, 2012
    Messages:
    63
    Likes Received:
    165
    I think in the future (or possibly even beginning now) Google will alter SERP results to some extent based on device. It makes sense from a useability perspective. This is totally a prediction mind (though Google do have bots with a user-agent as an iPad) but will be interesting to see nevertheless.

    Interesting nevertheless, and a good script and post :) Thanks.
     
    Last edited: Dec 4, 2012
  8. Nookie Monster

    Nookie Monster Senior Member

    Joined:
    Mar 28, 2010
    Messages:
    968
    Likes Received:
    463
    Location:
    USA
    I'm starting an Amazon store site. I also have the .info domain as well. This might be a good use of the extra domain. They both have the same name just different extentions. Most people never pay attention to the extention anyway so this might work out well for me.

    Thanks for the share!