Mobile app version of vmapp.org
Login or Join
Murphy175

: How to handle URL parameter for mobile site I have a phpBB forum with a skin for mobile users. Some javascript detects your device/resolution and sends you to the mobile skin or not. The URL's

@Murphy175

Posted in: #GoogleSearchConsole #RobotsTxt #Seo

I have a phpBB forum with a skin for mobile users. Some javascript detects your device/resolution and sends you to the mobile skin or not. The URL's remain the same, it's based on a cookie.

People that are on a larger screen, can still choose to use the mobile skin, by pressing a button that will send you to site.com/current_page?mobile=mobile.

I have 2 problems with this:


Duplicate pages on Google. I don't see any doubles popping up yet, but it's bound to happen right?
Sometimes Google indexes the mobile link. This causes desktop users to go to the mobile skin automatically and is certainly not intended functionality.


Will disallow *?mobile=mobile in robots.txt solve my problem? Can disallowing the parameter in GWT help? The parameter doesn't change the content, only the layout, so I can put it on ignore, but will (could) it help with my problem?

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Murphy175

3 Comments

Sorted by latest first Latest Oldest Best

 

@Megan663

Are you able edit the code on the ?mobile=mobile indepently from the main page? If so rather than using just the canonical tags, maybe you should also be using the markup for mobile pages.

On the desktop page, add a special link rel="alternate" tag pointing to the corresponding mobile URL. This helps Googlebot discover the location of your site's mobile pages.

<link rel="alternate" media="only screen and (max-width: 640px)"
href="http://www.example.com/current_page?mobile=mobile" >


On the mobile page, add a link rel="canonical" tag pointing to the corresponding desktop URL.

<link rel="canonical" href="http://www.example.com/current_page/" >


You can also defined the tags in a sitemap.xml file. More info here Building Smartphone-Optimized Websites

10% popularity Vote Up Vote Down


 

@Welton855

Create a subdomain example mobi.yoursite.com. and place the robots & duplicate web page files in the .mobi folder. Disallow robots to not index that sub domain folder.

Redirect them from yoursite.com to mobi.yoursite.com. with JavaScript (you then know that they have a tablet or android device. you should look at using bootstrap for responsiveness however)

<script type="text/javascript">


<!--



if (screen.width <= 800) {
window.location = "http://m.domain.com";

}
//-->
</script>


cookies are not always a good idea.

10% popularity Vote Up Vote Down


 

@Nimeshi995

Canonical links to the rescue

There's no need to use robots to block urls that are used by your users instead what you should be using is canonical links on the desktop version, by doing so you are informing Google that the content originates from this page this will resolve any duplicate problems.

Responsive design is the way forward

Nowadays it's agreed by Google, web design and seo professionals that responsive is ideal for most websites. Responsive design will allow you to serve your website to multiple devices the way you want it too without having to create multiple urls. Because your only be using one url any backlinks and social mentions gained you are boosting mobiles, tablets and desktops, of course canonical links will help but ideally you should use responsive and canonical links too.

Picking a template based on a framework

If your using free templates then I recommend you look for frameworks based on or have your designer to make his own framework or use one of the common open source ones.


SOURCE


Zurb Foundation
Bootstrap
Base
Gumby
Kube
Skeleton
Less Framework 4
Golden Grid System
Fluid Baseline Grid
Columnal
The Semantic Grid System
1140 Grid System
320 and Up Grid
The Goldilocks Approach
BluCSS
Frameless
Gridless
Amazium
Less Framework

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme