How to Remove ?m=1 from Blogger URL

 Hello Tech Lovers!

Do you want to know “How to remove ?m=1 from Blogger website”. Most bloggers start their blogging journey with this amazing free platform “Blogger”.  We are also using BlogSpot for this site. Whenever we host our website on the blogger platform, the URL of our blog looks perfect on the desktop view, but it puts “? m=1”   automatically at the end of the URL when we visit from Mobile devices.

remove m=1 and m=0 from blogger post url

When we visit our website on mobile, we will be redirected to the ?m=1 version. For example, if we visit this site https://www.freetoreads.com from a mobile it will be redirected to https://www.freetoreads.com/?m=1. If you want to continue your blogging journey on this platform then this is not harmful to your site’s SEO.


Why remove ?m=1 from your Blogger Blog?

However, most of the bloggers migrate their website to WordPress after getting some experience and traffic on their blogger site. So in this case m=1 causes SEO difficulties. When we migrate from Blogger to WordPress and our site’s URLs are indexed on google with ?m=1, then it will give a “404 error” because WordPress does not work with blogger mobile version (m=1).

The second reason that you should remove ?m=1 is because with m=1 your site does not look professional. For example, if you send the link to your blog post, if it includes m=1 then the user may not open your links. Because most of the developers use the Blogger platform for Black Hat SEO.


Also Read: How to remove date and .html from Blogger Post URL?


How to remove ?m=1 from Blogger Blog?

Copy code in the below box, Go to the theme and you should paste that code in your HTML code just before body closing tag </body> and then save the code.


Steps to remove ?m=1 from BlogSpot Site:

1.   Step 01: Go To Blogger

2.   Step 02: Go To Theme

3.   Step 03: Click On Edit HTML

4.   Step 04: Press CTRL+F And Find </body>

5.   Step 05: Copy the Code Given Below.

6.   Step 06: Paste That Code Above </body> Tag.

7.   Step 07: Save your Code.


Code to remove ?m=1 in Blogger/BlogSpot Blog:

 

<script>/*<![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);}; var protocol=window.location.protocol.replace(/\:/g,''); if(protocol=='http'){ var url=window.location.href.replace('http','https'); window.location.replace(url);} /*]]>*/</script>

 

Note: This code will remove ?m=1 from your blogger blog. It will also redirect your Blogger website to a secure version i.e. from “HTTP” to “HTTPS”.

 


Post a Comment

0 Comments