How to solve the m1 problem in Blogger

Hello everyone. Today I am going to share “How to solve the m1 problem in Blogger”. Friends if you are running a blog in Blogger, then you might have seen that whenever you open your blog in mobile devices you see m=1 written in the last section of your blog URL. Which is really annoying because the URL doesn’t look professional.

So I am here with a solution that how can you remove that m=1 from your blog URL. Let’s get started.

How to solve the m1 problem in Blogger

Step by Step Process:

After seeing the above image you might have understood the problem. To remove that m=1 from the URL, we need to make changes in our Blogger’s HTML Code and add a new script. For that first of all, we have to open our Blogger’s Dashboard.

Now click on the three dots and select Edit HTML.

Now go to the last section of the page and search for </body> tag.

Now paste the following code before </body> tag.

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

After pasting the code, Click on Save. The Theme will be saved.

NOTE: Don’t make any changes to the other codes. That will make your theme non-workable. So, follow the step by step process which I have mentioned in the post.

By doing this method you will be able to remove the m=1 from your blog URL and will be able to look it like professional.

ALSO READ:

Final Words:

So guys this was all about “How to solve the m1 problem in Blogger“. The steps are really simple. You have to paste the particular script in the desired location. And the problem is solved. If you like the post then share this post with others and subscribe to this blog. I’ll see you in the next post with an interesting stuff till then Stay Safe.

1 thought on “How to solve the m1 problem in Blogger”

Leave a Comment

Share via
Copy link
Powered by Social Snap