You are here
Home > seo > How to remove m=1 from URL in website

How to remove m=1 from URL in website

 

How to remove m=1

How to remove m=1 from URL in blogger: Whenever we host a website in blogger, the URL of that website shows fine on the desktop. But when you see that website on mobile, then ?m=1 will be behind the URL in mobile.

Whenever you open your website on mobile, the URL of the website gets redirected. As if

You will not face any problem with this.

There is no problem with this in Google Search Console. Because of the canonical tag that you guys already use in the theme. Already o indicates your main URL only. But if you want your website URL to look the same on a desktop as well as on mobile. So you can use it.

How to remove m=1 from URL in website

  • First, you log in to your blogger dashboard.
  • Click on the Theme option.
  • Click on Edit HTML.
  • Click once inside the box that appears in front of you.
  • Press Control Plus App (CTRL + F) from the keyboard. (If you do not understand then see photo 1)
  • Type this in the search box you see in the corner, and press enter. (If you do not understand then see photo 2)
  • Pressing enter will take you where it is written.
  • Now you have to paste the court given below on it. (If you do not understand then see photo 3)
  • And save the theme.

<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>

 

Leave a Reply

Top