How to Remove ?m=1 from Blogger and ?i=1 from InfinityFree: Boost SEO & AdSense Approval

 

Blogger settings and InfinityFree file manager to remove ?m=1 and to remove ?i=1


Having ?m=1 or ?i=1 in your website URLs can negatively impact your SEO and potentially hinder AdSense approval. 


These parameters are often added for mobile views or internal tracking and are generally not needed for a clean, search engine-friendly URL. Here's a step-by-step guide to remove them, making your site more appealing to search engines and AdSense.


Why Remove These Parameters?

Improved SEO: Cleaner URLs are easier for search engine crawlers to understand and index. Duplicate content issues arising from different URLs pointing to the same page are also avoided.

Better User Experience: Short, descriptive URLs are more user-friendly and trustworthy.

AdSense Approval: While not always a direct blocker, a well-structured and clean website is more likely to be approved by AdSense. Parameters can sometimes make your site appear less professional or generate duplicate content concerns.


Part 1: Removing ?m=1 from Blogger

The ?m=1 parameter is typically appended to Blogger URLs when the mobile version of your site is accessed. This can lead to duplicate content in search results (e.g., yourblog.com/post-title.html and yourblog.com/post-title.html?m=1).


Step 1: Go to Your Blogger Dashboard

Log in to your Blogger account.

Step 2: Navigate to Theme


In the left-hand menu, click on "Theme."


Step 3: Edit HTML

Under the "My theme" section, click on the three dots next to "CUSTOMIZE" and select "Edit HTML."

Step 4: Add the JavaScript Redirection Code

Before the closing </head> tag, paste the following JavaScript code. This code detects the ?m=1 parameter and redirects the user to the clean URL.


<script type='text/javascript'>

//<![CDATA[

var blog = document.location.hostname;

var slug = document.location.pathname;

var absolute = blog + slug;

var mobile = /\?m=1/g;

if (absolute.match(mobile)) {

  absolute = absolute.replace(mobile, "");

  window.location.href = "http://" + absolute;

}

//]]>

</script>


Step 5: Save Theme

Click the "Save theme" icon (usually a floppy disk or save button) to apply the changes.


Explanation of the Code:

It checks if the current URL contains ?m=1.

If found, it removes the parameter from the URL.

It then redirects the browser to the cleaned URL, ensuring that search engines and users always see the canonical version of your page.


Part 2: Removing ?i=1 from InfinityFree (or Similar Hosting)


The ?i=1 parameter is less common but can appear on some free hosting providers like InfinityFree, often related to internal tracking or caching. Removing it usually involves .htaccess rules.


Step 1: Access Your Hosting Control Panel

Log in to your InfinityFree (or other hosting) control panel. This is usually provided by your host.


Step 2: Navigate to File Manager

Find and click on "File Manager."


Step 3: Locate Your htdocs Folder

Go into the htdocs (or public_html) folder for your domain. This is where your website files are located.

Step 4: Edit or Create .htaccess File

Look for a file named .htaccess. If it doesn't exist, create a new file and name it .htaccess (make sure to include the leading dot).

Step 5: Add Redirection Code to .htaccess

Open the .htaccess file and add the following code. This uses mod_rewrite to permanently redirect URLs containing ?i=1 to their clean counterparts.


RewriteEngine On

RewriteCond %{QUERY_STRING} ^i=1$ [NC]

RewriteRule (.*) $1? [R=301,L]



Explanation of the Code:

RewriteEngine On: Activates the rewrite engine.

RewriteCond %{QUERY_STRING} ^i=1$ [NC]: This condition checks if the query string exactly matches i=1 (case-insensitive).

RewriteRule (.*) $1? [R=301,L]: If the condition is met, this rule redirects the request.

(.*) captures the entire path before the query string.

$1? redirects to the captured path ($1) followed by a question mark, which effectively removes the query string.

[R=301,L] performs a permanent (301) redirect and stops processing further rewrite rules.


Step 6: Save Changes

Save the .htaccess file.


Final Check & Verification

After implementing these changes:

Clear your browser cache and visit your website.

Test your URLs:

Try accessing a Blogger post with ?m=1 at the end (e.g., yourblog.com/post-title.html?m=1). It should redirect to yourblog.com/post-title.html.

If applicable, try accessing an InfinityFree page with ?i=1 (e.g., yourdomain.com/page.html?i=1). It should redirect to yourdomain.com/page.html.

Check Google Search Console: If you have access, monitor your crawl stats and look for any new indexing issues. You might want to resubmit your sitemap.

By following these steps, you'll significantly improve your website's URL structure, making it more SEO-friendly and increasing its chances for AdSense approval. Here's an example of what your well-optimized website could look like:

Post a Comment

Previous Post Next Post