If you're using Blogger (Blogspot) for your website, you might have noticed that the URL contains a ?m=1
parameter when accessed from mobile devices. While this is a default behavior, it can make your URL look less professional. Fortunately, there's a quick way to remove the ?m=1
from your Blogger URL and present a clean, streamlined URL to your visitors.
In this guide, we will show you how to remove the ?m=1
from your Blogger URL in just 2 minutes. We will also discuss whether it’s necessary to implement this change on your website.
Why Does Blogger Show the ?M=1 Parameter in Mobile URLs?
Blogger (Blogspot) is an older platform, and many themes in the past did not have responsive design. To properly identify mobile visitors, Blogger introduced the ?m=1
parameter in the URL. This tells the platform that the visitor is on a mobile device and ensures the correct mobile version of the site is displayed.
For example, when someone accesses your blog on a mobile device, the URL will look something like this:
https://www.yourdomain.com/?m=1
However, with most modern themes now using responsive design, there’s no longer a need for a separate mobile version. This is why you may want to remove the ?m=1
parameter, as it’s redundant and can make your URL look cluttered.
Although there’s no permanent fix provided by Blogger, you can use a simple script to remove the ?m=1
parameter from your URL and make it cleaner.
How to Remove the ?M=1
From Blogger URL: 4 Simple Steps
Follow these steps to remove the ?m=1
parameter from your Blogger URLs:
Step 1: Access Your Blogger Dashboard
Go to your Blogger dashboard and click on the "Theme" option from the left-hand sidebar.
Step 2: Edit HTML
Click on the "Edit HTML" option from the drop-down menu under the "Theme" section. This will open up the HTML code of your blog.
Step 3: Insert the Script
Next, you need to add a script that will remove the ?m=1
from the URL. Copy and paste the following script just below the <head>
tag in your HTML code:
<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>
Step 4: Save the Changes
Once you've pasted the script, save the changes by clicking on the "Save" button. The ?m=1
parameter will now be removed from the URLs when your site is accessed from mobile devices.
Should You Remove the ?M=1
Parameter?
While removing the ?m=1
parameter improves the appearance of your URL, you may be wondering if it will have any impact on your site's SEO or performance.
Here’s what you need to know:
-
SEO Impact: Using the script does not permanently remove the
?m=1
from the URL. Instead, it redirects the URL to its clean version in the browser’s history. As a result, this doesn’t have a major negative impact on SEO. However, it’s important to note that using a clean URL could help your site appear more professional in search results. -
Site Speed: Removing the
?m=1
does not significantly improve the speed of your site. Any speed fluctuations are more likely due to server response times rather than the presence of the?m=1
parameter. So, while it can make your URL cleaner, it doesn’t drastically affect loading speeds.
Should You Implement This on Your Site?
The decision to implement this change depends on your site's goals. If your website is relatively new and doesn’t have many posts published yet, implementing the script can give your site a polished, professional appearance. However, if your site has been established for a while with a significant amount of content, it might not be necessary unless you're aiming for a more streamlined URL structure.
Conclusion
In just 2 minutes, you can easily remove the ?m=1
parameter from your Blogger URLs and make your site look cleaner and more professional. This small tweak can enhance your blog’s SEO and improve its overall user experience. Remember, it’s not a permanent solution, but it does help maintain a clean URL structure for mobile users.
Follow the simple steps above, and enjoy a neater, more polished Blogger site!
You may Also Like......
0 Comments