How To Remove Blogger URL Parameters ?m=1 and ?m=0 - How2Stuff How To Remove Blogger URL Parameters ?m=1 and ?m=0

Saturday, November 2, 2019

How To Remove Blogger URL Parameters ?m=1 and ?m=0

I want to share how you can remove the parameter /?m = 1 and /?m = 0 from the URL in Blogger. The purpose of wanting to eliminate these two parameters that come after our URLs from any blog made on bloggers, when they enter from a cell phone, is to reduce the duplicate content that Google detects.


Examples:
https://www.example.com?m=1
https://www.example.com?m=0

These URLs are the same, but Blogger, when entering from a cell phone, will show us this structure at the end of each URL. Therefore, if you see a URL where it finally shows? M = 1, this means that you are using the blogger platform for your site.

STEP 1: REMOVE /?M = 1 AND /?M = 0 FROM A BLOGGER URL


In order to remove these parameters from our URLs in Blogger, we just have to enter the Blogger template editor, search for the </head> or </ head > of our template and paste the following script on top of it.
 
<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>
  
 

STEP 2: CONFIGURATION IN SEARCH CONSOLE


So far, we have been able to eliminate the parameters of /?m = 1 and /?m = 0 from our blog in Blogger, it is time to tell Search Console not to track them.

For this we go to the Google Webmaster Tool:

When entering we will find two parameters to choose, we will only choose the one that says “max-results” and in on the right side, we click on “EDIT”
Google Webmaster Tool Max-results Parameters

Next, we will see some pop-up options, Select "Yes: Changes, records, or narrows page content" in the first option and "Paginates" in the second option. You should put the same as image below that I will share below and finally "SAVE".
Google Webmaster Tool Max-results Parameters Removal

After having done those simple steps, we just mentioned to Google that it does not track the parameters we just deleted with the Script above.

ARE THERE NEGATIVE EFFECTS WHEN USING THE SCRIPT?


There is no way that there are negative or secondary effects, since by implementing the script and telling Search Console not to track it, we would be preventing Google from taking it as duplicate content by having such parameters.

BY REMOVING THESE PARAMETERS, WILL IT AFFECT THE POSITIONING OF OUR BLOG?


Having duplicate content if we would be affecting the positioning of our sites, having these parameters if we were having such problems, but since SEO is based more on the keywords and quality content that we should have on our sites, this technique would not be Affecting our blog.

This Is The Newest Post
PREVIOUS ARTICLE Previous Post
This Is The Newest Post
PREVIOUS ARTICLE Previous Post
 

Delivered by FeedBurner