How to remove ?m=1 from blogger site urls?

Hey guys! Welcome to another Bytes Vibe Blogger tutorials. When managing a Blogger site from mobile, we will see the “m=1” parameter in blogger URLs. This parameter is essential for mobile page rendering but it can impact SEO. In this guide, I’ll show you how to remove ?m=1 from Blogger URLs.

How to remove ?m=1 from blogger site url? - Bytes Vibe

What is m=1 in blogger sites?

The “m=1” parameter is automatically added to URLs when a Blogger site is viewed from a mobile device. This parameter shows that the blogger page is being displayed in a mobile-friendly format. But Search engines treat URLs with ?m=1 as separate pages from their desktop counterparts which can lead to duplicate content issues in Google Search Console. This duplication can lower authority and negatively affect its ranking in search results. Suppose our blogger site link is example.com but if we open it from mobile, it will look like example.com?m=1.

How to remove ?m=1 from blogger posts urls?

Now that we understand the importance of removing the “m=1” parameter from mobile devices, let’s see how we can remove it from blogger site. We will use JavaScript to remove m=1 from blogger url. To remove ?m=1 from blogger site url follow these steps below:

  • Add JavaScript Code: Log in to Blogger website. Than go to “Theme” > “Edit HTML“. Now insert the following JavaScript code just after the <head> tag:
<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>Code language: HTML, XML (xml)
  • Save blogger theme: Save the changes in blogger theme and test blogger site on a mobile device to ensure the ?m=1″ parameter is removed correctly.

Removing the ?m=1 parameter from Blogger URLs is a crucial step in optimizing blog for better SEO and user experience. But sometimes you may need to reindex all the post again from search console. So proceed with caution. And if you face any troubleshoot than comment below. Bytes Vibe will help you with to remove ?m=1 from blogger site url.

Share this post -

Leave a Reply

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