How to Remove ?m=1 From Blogger URL

Update:

If your website is in Blogger, then whenever you view the Blogger URL from mobile, you see “?m=1” which looks a bit strange.

Everyone wants the URL of their website to look correct and clean. Whether he is viewing it on mobile or desktop. So in this article, we will tell you how to fix this issue.

Read More: How to Add a Stylish List to WordPress and Blogger

Why does ?m=1 appear in the Blogger URL on mobile

Blogger is a very old CMS platform. Which did not support responsive themes. Different types of views were available for desktop and mobile. So to easily identify, started putting ?m=1 at the end of the blogger url for the mobile version.

As soon as someone searches your blog, he checks where the URL has been opened with the ?m=1 parameter.

How to remove ?m=1 from the Blogger URL

If you want to remove ?m=1 from the mobile version of your blogger, then see the process given below.

  • First of all, go to the blogger dashboard and select the theme option.
  • After that, go to the theme and select the “Edit HTML” option which will be found in the drop-down.
  • After that, you have to paste the script given below after the <head> tag in your theme.
  • It will look something like this. The code is given below
<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>
  • Once you copy and paste the code, the ?m=1 will be removed from your Blogger URL in the mobile version.

If still for some reason this code does not work then you can use another code for it, with the help of this ?m=1 will definitely be removed from your blog.

<script>/*<![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>

I hope you liked this article How to Remove ?M=1 From Blogger URL? if you have any questions in your mind, please write in the comment box and share this post with your friends on social media platforms Facebook and Twitter.

Hi, I am Roton Kumar Roy a part-time Blogger,Youtuber and founder of Chat4Now.com. Here, I post about blogging to help people make money online.

Leave a Comment