Remove ?m=1
<script type='text/javascript'> //<![CDATA[ (function() { var uri = window.location.toString(); if (uri.indexOf("?m=1") > -1) { var clean_uri = uri.substring(0, uri.indexOf("?m=1")); window.history.replaceState({}, document.title, clean_uri); } else if (uri.indexOf("&m=1") > -1) { var clean_uri = uri.substring(0, uri.indexOf("&m=1")); window.history.replaceState({}, document.title, clean_uri); } })(); //]]> </script>
What this code does
- This script removes ?m=1 or &m=1 from Blogger URLs.
- In Blogger, ?m=1 means the mobile version of your site.
- Using this script will always display the desktop URL, even on mobile, making the URLs cleaner.
How to use this script
- Blogger Dashboard → Theme → Edit HTML.
- Scroll to the very bottom of the code, just before </body>.
- Save the theme and check your blog.
Now ?m=1 will be automatically removed from your URL.