Breaking

Monday, 14 September 2020

How to Remove ?m=1 From Blogger

Hi friends,  every blogger when start blogging in blogger they face ?m=1 tag in their blog URL so today I will discuss how to remove ?m=1 from blogger. ?m=1 is basically a mobile view parameter, but in Google Webmaster, it is an alternate page error with the appropriate canonical tag. this is very easy to fix it with some javascript code. You have to follow some simple steps.

How to Disable Mobile View Parameter m=1  in Blogger

How to Remove ?m=1 From Blogger


Steps:-

==> Go To Blogger Dashboard.
==> Go To Theme Section.
==> Click On  Edit HTML .
==> Press CRT+ F .
==> Type </body> and search .
==> Paste the Code Given Below above the </body> tag .


************************** Code ***********************************


<script type='text/javascript'>
//<![CDATA[
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>


Hope you like my post, I am sure that you have Remove ?m=1 From Blogger you must share this post !!

No comments:

Post a Comment

thanks

Pages