How to remove ?m=1 from blogger website URL (Blogspot)

How to remove ?m=1?

When you visit a blogger website or blogspot, you always see ?m=1 at the end of the url if you are browsing through your mobile device. This query at the end of url related to mobile view and responsiveness.

But this query string style has already outdated and may seems imperfect to some of you, that is why you are here already.

To remove ?m=1 URL query from your blogger website, here is a simple solution which is experimental. [I hope this code is not against the blogger’s guidelines and policy]

Code for:

<script type='text/javascript'>
// 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>

Add this code to your blog as widget or by editing the HTML from blogger dashboard.

Conclusion

If you ask me, I would not recommend you to add these code to any of your blog. If this is not important, google would not have to use this query string. I say don’t remove it, instead try to add quality contents readers are craving for.

I wouldn’t mind a query string at the end of my blog as far as that doesn’t affect my blog. If this affects your blog’s SEO, google would not have implemented this in the first place.

So just relax if you are concerned about SEO, & don’t alter the current behaviour, if you are removing this for SEO concerns.

If you think that visitors gonna notice that query string at the end of your url, you are wrong because majority of your readers are not gonna even understand what that is and even most of them doesn’t even look at the url bar. ^-^

Read Also:  Onepress Blogger Template: Premium theme for blogs

Leave a Reply

Your email address will not be published. Required fields are marked *