How To Remove m=1 in Blogger URL - 4 Simple Step




We all know that "simplicity is beauty". So, in this post, I will guide you on how to remove ?m=1 from blogger URL, and make a simple professional URL. If you pay attention when you visit any Blogger blog on the mobile phone, then there will show you, ?m=1 in the page address (URL). Usually, it is a mobile view parameter.


I have seen around the internet (Google, Blogger help ) many Bloggers has asked questions on "how to remove?m=1 from blogger", but no one has any responded. So, I think why I am not resolving this issue! And finally, I have got a solution for this. Although I have got a solution for this, it was complicated to do.


Why we need to remove m=1 from the blogger URL, because if we want after some time to convert our blogger website into WordPress, At that time we facing many issues and unable to convert our blog into a WordPress theme.

The m present in the URL represents that we are using that website in the mobile view. Obviously, we create our website as per desktop view and then convert into a mobile view, because it's necessary to our website is mobile-friendly, everyone has every time to find any information on our mobile instead of desktop.
If you have moved your blog from blogger to self-hosted WordPress platform, then you likely to see a 404 or page not found error for URLs ending with ?m=1. These are blogger mobile version URLs.
The second one, also it doesn't look good after every blog URL, if we copied the URL and want to send it to others, it also consists of m-1 without blog URL, it's very irrelevant.
Here I describe how to remove m=1 from your blog URL, For this, I created HTML code that is helpful for removing this from the URL.


I provide one code, Go to the theme and you should paste that code into your HTML edit option before the end of </body> tag and save the 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>



So Today I Will Show You How To Remove ?m=1 From Blogger. You Have To Follow Some Simple Steps.

➡️ Go To Blogger
➡️ Go To Theme
➡️ Click On Edit HTML
➡️ Press CTRL+F And Find </body>
➡️ Copy the Code Given Above.
➡️ And Paste That Code Above </body> Tag.

Baca juga

Post a Comment