Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 21st Apr 2015, 06:08 PM   #1
Slurp, Slurp!
War Room Member
 
nmwf's Avatar
 
Join Date: 2015
Location: Sacramento, CA
Posts: 864
Thanks: 257
Thanked 236 Times in 191 Posts
Default
Pass Google's mobile test: 10 minutes - 10 Steps!
Share on: 
fb share twitter share gplus share more share

Note: This content was previously published and posted with permission from myself. I wrote this! So enjoy:

Here's a temporary fix that will pass Google's mobile test no matter how small or large your website is. Use it until you can enable a proper mobile solution.
1. Open the index.html or default.html page in your server's root directory.

2. Add the following between the <head></head> tags. (Replace YOUR-WEBSITE.com with your domain name first!)

Code:
<link rel="alternate" media="only screen and (max-width: 640px)"  href="http://www.YOUR-WEBSITE.com/mobile/index.html">
3. Add this javascript code between the <head></head> tags as well. It redirects mobile users to your mobile site:

Code:
<script type="text/javascript">
<!--
if (screen.width <= 699) {
document.location = "/mobile/index.html";
}
//-->
</script>
4. Save the file and then create a new folder on your server's root directory. Name the new folder, "mobile".

5. Open the following link in your browser. (Replace YOUR-WEBSITE.com with your domain name first.)

Code:
http://www.google.com/gwt/x?noimg=1&wsc=pa&u=http://www.YOUR-WEBSITE.com
6. Save the resulting page (a mobile representation of your site's home page) to your hard drive as "index.html" and then open it in a plain text editor.

7. Add the following between the <head></head> tags. (Again, replace YOUR-WEBSITE.com with your domain name first.)

Code:
  <link rel="canonical" href="http://www.YOUR-WEBSITE.com/index.html" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
8. Search for and replace every instance of

Code:
<a href='/gwt/x?
with

Code:
<a href='http://www.google.com/gwt/x?
9. Save the index.html page that you just edited and upload it to the "mobile" directory.

10. Run your website through Google's mobile tester here:

https://www.google.com/webmasters/tools/mobile-friendly
Success!

Write comprehensible articles on *any* topic in seconds with First Draft...
First Draft's: Download | Add-Ons | Templates | Purchase | Support | Affiliates
nmwf is offline  
The Following 2 Users Say Thank You to nmwf For This Useful Post:
Unread 7th Aug 2015, 11:17 AM   #2
ChaletDM
 
ChaletDM's Avatar
 
Join Date: 2012
Location: Good Ole' US of A
Posts: 32
Thanks: 0
Thanked 11 Times in 9 Posts
Default
Re: Pass Google's mobile test: 10 minutes - 10 Steps!
Share on: 
fb share twitter share gplus share more share

Hi Nmwf,

I'm so glad that you added the text about "Use it until you can enable a proper mobile solution." As you know, a mobile website is much more than a temporary solution to pass a Google test.

At the end of the day it is about "adding value". When you develop a great mobile website your customers will find it easy to use and simple to navigate. This means that they will not get frustrated in finding what they need and as a direct result, contact you and buy your products or services.

All The Best!
-Wallace

ChaletDM is offline  
The Following User Says Thank You to ChaletDM For This Useful Post:
Closed Thread


Bookmarks

Tags
google, minutes, mobile, pass, steps


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 12:41 PM.