How to remove m=1 from blogger Url | Hide

0

How to remove m=1 from blogger Url | Hide

Today In this post - I will share How to remove m=1 from blogger Url Using Javascript Code / How do i hide m=1/m=0 From Blogger Url Using Javascript Code? 

How to remove m=1 from blogger Url


When we open a website we see the URL of that website (https://domain.com), but if you notice, the Blogger website is a bit different from the normal site link.  For example: https://domain.com?m=1, https://domain.com?m=0.  So many of us think, how to hide m = 1 from our site link.

You can't remove m = 1 url if you want to, because it is required for Blogger's url.  However you can hide m = 1 from blogger url using javascript code.

If you have removed m = 1 from blogger url, then it can have an impact on the blog site m=1 does not affect the canonical URL of the page or blog. The only other issue it might corrupt is in Analytics to you site which you can easily remove in the View Settings for your property from themes. Which many people do not understand, but will not be a big problem.  Many of us have hidden m = 1 using this javascript.  Maybe you haven't noticed how much impact the seo case has.


I will suggest personally, you do not need to hide m = 1 from blogger url.  However, if you think that it is very important for you to do this, then do as shown below, then you also have to remove M = 1 from your blogger url.  So, let's get started -

How to remove m=1 from blogger Url Using Javascript Code / Hide m=1 

If you want to hide M = 1 / m = 0 from the blog link, follow the steps below, I will provide tow method ,you can use one method.

Method 1

  • Go to Blogger Dashboard 
  • Theme 
  • Edite HTML
  • Now, Search for <head> section and paste blew javascript code after <head> section.
  • Then save Theme. 


Javascript Code : 

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



Method 2 


  • Go to Blogger Dashboard 
  • Theme 
  • Edite Theme
  • Now, Search for </body> and paste above </body> section.
Javascript 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>(code-box)

Now save theme and enjoy.




Tags :   Remove / Hide m=1 from Blogger Url

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.
Post a Comment (0)