Sunday, May 5, 2024

Remove ?m=1 parameter from URLs in Blogger

Standard
Blogger

When using Blogger, URLs often include the ?m=1 parameter for mobile versions, which can clutter links and potentially affect SEO performance. Below are methods to remove this parameter efficiently.



Method 1: Vanilla JavaScript (Client-Side Approach)

Key2Blogging suggests using Vanilla JavaScript on the client side to enhance the URL’s visibility for users. While this improves link cleanliness, it does not provide a real SEO advantage.

Remove ?m=1 Parameter Using JavaScript

More details: Key2Blogging Article // Key2Blogging Video



Method 2: Cloudflare Worker (Server-Side Approach)

Fineshop Design suggests using Cloudflare Worker for server-side redirection. Although this method does not entirely remove Google Search Console errors (such as Alternative page with proper canonical tag or Page with redirect), it helps reduce the occurrence of unwanted redirections on mobile and tablet devices.

Redirection Using Worker.js

More details: Fineshop Design Article



Method 03: Cloudflare Worker to force desktop User-Agent (Server-Side Approach)

It's possible to use Cloudflare Workers to enforce a desktop user-agent server-side, ensuring Blogger always perceives visitors as desktop users. By concealing the mobile user-agent, this approach prevents Blogger from appending ?m=1 or ?m=0 to URLs, maintaining a unified browsing experience across all devices. This method offers the strongest SEO advantages, preventing search engines from treating mobile and desktop versions as distinct entities.

Worker.js Implementation

0 comments: