How to Remove ?m=1 From Blogger Blog Post URL?

It is a Webmaster forum to discuss website promotion, CMS management, Search Engine discussions, AdSense, etc.
Post Reply
Thomas
Standard User
Posts: 43
Joined: 21 Oct 2023, 15:30

How to Remove ?m=1 From Blogger Blog Post URL?

Post by Thomas »

I have a Blogger blog that shows the post links with ?m=0 and ?m=1 extensions on mobile phones. They work fine on my PC. Is it normal?

If not, I wish to know how to delete the ?m=1 URL extensions on mobile devices.
Alex George
Global Moderator
Posts: 60
Joined: 14 Nov 2023, 04:39
Location: Brooklyn

How to Remove Blogger m=1 from URLs?

Post by Alex George »

We can easily remove ?m=1 from the Blogspot post URL. Let me explain the steps below.

Step-1: Make sure your Blogger blog has a responsive theme.

Step 2: Remove the Mobile Redirection With a Script.
  1. Log into the Blogger account.
  2. Tap on Theme.
  3. Click on HTML Edit from the Customize menu.
  4. Type the following script before the closing of the HTML body tag.

    Code: Select all

    
    <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>
    
    
    
  5. Save the changes.
It will remove the ?m=1 From Ending URL In Blogger.
Thomas
Standard User
Posts: 43
Joined: 21 Oct 2023, 15:30

How to Cancel the ?m=1 Blogger Redirection?

Post by Thomas »

Thank you for the solution. But, can you explain how to open Edit HTML option?
Alex George
Global Moderator
Posts: 60
Joined: 14 Nov 2023, 04:39
Location: Brooklyn

Stop ?m=1 Blogger Page Redirection On Mobile Devices

Post by Alex George »

Once you log into the Blogger account, click the Theme from the left menu.

Image

Click on the downward arrow button.

Image


Click the Edit HTML to continue the steps I mentioned.
Thomas
Standard User
Posts: 43
Joined: 21 Oct 2023, 15:30

Re: How to Remove ?m=1 From Blogger Blog Post URL?

Post by Thomas »

Good. It was simple. Thanks.
Post Reply