Blogger - How to Remove the ?m=1 from a Blog URL - Solved

Fix for not showing ?m=1 at the end of a Blogger URL

how to remove ?m=1 from blogger url


The ?m=1 appears after the permanent url (domain.com/2021/blog-url.html) when entered from a mobile device. This doesn't happen when viewing the input from a computer. Having ?m=1 at the end of your post URL could cause Search Console to detect it as duplicate content.

Search Console can detect that there are two contents with different URL variants, one with and one without ?m=1

You can solve this case in two ways: 

  1. Have the content with ?m=1 automatically redirected through a JavaScript code that you place in the template
  2. Manually place a 301 redirect to each post with the goal that they go to the URL without ?m=1

What SEO impact does a URL ending with ?m=1 have

It can negatively affect the SEO of your blog because the strength of authority is divided, users who enter from a mobile will be counted in Google Analytics as a different URL and therefore, the authority of your blog will be divided.

Also, Search Console may index and leave the one ending with ?m=1 as the canonical URL.

So that this does not happen, then, I recommend you do the following.

JavaScript code to redirect the URL

The following code will help us so that every time a user enters from a mobile device, it will be redirected to the URL without ?m=1

Copy the code and paste it before the </body> tag of your template.


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

Redirect Manually

I mean to place a 301 redirect to each entry, and this is done by:

  1. blogging
  2. enter configuration
  3. you look for errors and redirects
  4. click on custom redirects, then Add
  5. You paste the URL that ends in ?m=1
  6. you paste the URL that does not contain this ending at the end (?m=1)
  7. You place in Permanent and Guards.
  8. You do this same step with each entry.

Publicar un comentario

Déjame un mensaje.

Artículo Anterior Artículo Siguiente

نموذج الاتصال

// Cargamos el SDK de Facebook window.fbAsyncInit = function() { FB.init({ appId : '570341645200786', cookie : true, xfbml : true, version : 'v11.0' }); // Evento que se ejecuta al dar clic en el botón Me Gusta FB.Event.subscribe('edge.create', function(response) { document.getElementById("contenido").style.display = "block"; document.getElementById("boton-fb").style.display = "none"; }); }; (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "https://connect.facebook.net/es_ES/sdk.js#xfbml=1&version=v11.0&appId=570341645200786&autoLogAppEvents=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));