Blogger automatically adds "?m=1" to the end of URLs for mobile versions of your blog posts. If you want to remove it, you can follow these steps:
Save the gadget.
This script checks if "?m=1" is present in the URL and removes it if found.
Method 1: Use HTML/JavaScript gadget
- Go to your Blogger dashboard.
- Select the blog you want to edit.
- Navigate to "Layout" in the left-hand menu.
- Add a new HTML/JavaScript gadget to your layout.
remove "?m=1" from url?
<script> var uri = window.location.toString(); // Check if "%3D" is present in the URL and remove it if (uri.indexOf("%3D", "%3D") > 0) { var i = uri.substring(0, uri.indexOf("%3D")); window.history.replaceState({}, document.title, i); } // Check if "%3D%3D" is present in the URL and remove it if (uri.indexOf("%3D%3D", "%3D%3D") > 0) { var i = uri.substring(0, uri.indexOf("%3D%3D")); window.history.replaceState({}, document.title, i); } // Check if "&m=1" is present in the URL and remove it if (uri.indexOf("&m=1", "&m=1") > 0) { var i = uri.substring(0, uri.indexOf("&m=1")); window.history.replaceState({}, document.title, i); } // Check if "?m=1" is present in the URL and remove it if (uri.indexOf("?m=1", "?m=1") > 0) { var i = uri.substring(0, uri.indexOf("?m=1")); window.history.replaceState({}, document.title, i); } </sccript>
This script checks if "?m=1" is present in the URL and removes it if found.
Method 2: Use Custom Redirects
- Go to your Blogger dashboard.
- Select the blog you want to edit.
- Navigate to "Settings" and then "Search preferences."
- Look for the "Errors and redirections" section.
- Click on "Edit" next to "Custom Redirects."
Add a new redirect with the following settings:
From: /?m=1
To: /
Save your changes.
This method uses Blogger's built-in redirect feature to send users from the mobile URL to the standard one.
After implementing either of these methods, your blog post URLs should no longer have "?m=1" appended to them. Make sure to test it to ensure it's working as expected.
From: /?m=1
To: /
Save your changes.
This method uses Blogger's built-in redirect feature to send users from the mobile URL to the standard one.
After implementing either of these methods, your blog post URLs should no longer have "?m=1" appended to them. Make sure to test it to ensure it's working as expected.