fixiw ~ Hello fixiw friends, on this
occasion l will share a tutorial about How to Remove? M=1 and? M=0 in Blog URL. The purpose of eliminating the description ?m=1 and ?m=0 is to reduce the duplication factor of detected content.

Examples of detected duplicate content are as follows:

https://www.fixiw.com/?m=1

https://www.fixiw.com/?m=0

The two URLs above are actually the same.


This happens because the M code is a
mobile URL from Google, as you know that Blogger provides a certain structure for the mobile version of the page by adding ?M =1 or ?M= 0 at the end of the URL.

The M code displayed indicates that the
URL is being accessed on a Mobile device, or in CSS language, it is often termed Media only and Screen . So that the URL that contains the sign ?m=1and ?m=0 in the URL can be guessed that the blog uses the Blogger platform.

1. MEANING FROM URL ? M=1

  • Indicates that the blog is being accessed in cellular / mobile mode


2. THE MEANING OF FROM URL ? M=0

  • Indicates that the blog is being accessed in desktop mode on a cellular / mobile device.

How to get rid of? M = 1 and?
M = o in the blog uRL?

How to Remove m=1 from Blog URL 

How to Remove M=1 and M=0 in Blog URL

To remove the ?M= 1and ?M=0 signs in the Blog URL, you can use the code below and put it in your template.

<script type='text/javascript'>
var uri = window.location.toString();
if (uri.indexOf("%3D","%3D") > 0) {
var clean_uri = uri.substring(0, uri.indexOf("%3D"));
window.history.replaceState({}, document.title, clean_uri);
}
var uri = window.location.toString();
if (uri.indexOf("%3D%3D","%3D%3D") > 0) {
var clean_uri = uri.substring(0, uri.indexOf("%3D%3D"));
window.history.replaceState({}, document.title, clean_uri);
}
var uri = window.location.toString();
if (uri.indexOf("&m=1","&m=1") > 0) {
var clean_uri = uri.substring(0, uri.indexOf("&m=1"));
window.history.replaceState({}, document.title, clean_uri);
}
var uri = window.location.toString();
if (uri.indexOf("?m=1","?m=1") > 0) {
var clean_uri = uri.substring(0, uri.indexOf("?m=1"));
window.history.replaceState({}, document.title, clean_uri);
}
</script>

Installation of the code above can be done in 2 methods, from these 2 methods, please choose Which method you think is easy to do.

METHOD 1 - THROUGH THE LAYOUT MENU

  1. Enter the Layout Menu
  2. Add Gadget >> Select HTML/ Javascript
  3. Copy the Code that were above earlier
  4. Enter the codes above into the Gadgets section. 
  5. Save Gadgets
  6. Done

METHOD 2 - THROUGH THE THEME MENU

  1. Enter the Themes
  2. Look for the </head> or <head /> code in your template
  3. Copy the codes that given below. 

<script type='text/javascript'>

var uri = window.location.toString();
if (uri.indexOf("&m=1","&m=1") > 0) {
  var clean_uri = uri.substring(0, uri.indexOf("&m=1"));
    window.history.replaceState({}, document.title, clean_uri);
}
var uri = window.location.toString();
if (uri.indexOf("?m=1","?m=1") > 0) {
  var clean_uri = uri.substring(0, uri.indexOf("?m=1"));
    window.history.replaceState({}, document.title, clean_uri);
}
</script>

  1. Open the Parse Page
  2. Paste the code in the parse >> column then click Parse
  3. Copy the parsed code then Paste the code above the </head> or <head /> code
  4. Save Template
  5. Done

So, until/ here you haves Succeeded in removing then Information ? M = 1 and ? M = 0 int he Blog URL.

How to Remove? M=1 and? M=0 in Blog URL

RESULT

How to Remove? M=1 and? M=0 in Blog URL


ATTENTION !!!

If you want to apply this method, l suggest you use the code that fixiw modified and place it above the </head> code (the function is the same as the code above, but this one is more concise. 

lf it fails to save the template, first parse
the code here then use above codes. 

That's the information about " How to
Remove? M = 1 and? M = O
in the Blog URL good luck and hopefully useful.

Good luck !

Post a Comment

Previous Post Next Post