Google showing Duplicate Title and description Tags Errors in GWT


Google showing Duplicate Title and description Tags Errors in GWT under HTML Improvements duplicate meta description - 4 and duplicate title tags - 4.



So, I need search engines not to index the ?m parameter at the end of my website url. I guess this is a development issue. In the .htaccess I found the code below that might lead to the m parameter issue on google. Does someone know how to fix it?

#Redirect urls based on a query string parameter
RewriteCond %{QUERY_STRING} ^(.&)?view=mobile([^&])&?(.)?$
RewriteRule ^(.)$ /$1?m%1%3 [CO=is_mobile:1:%{HTTP_HOST},CO=disable_mobile:0:%{HTTP_HOST},L,R]

RewriteCond %{QUERY_STRING} ^m(.&)?view=full([^&])&?(.)?$
RewriteRule ^(.*)$ /$1?%1%3 [CO=disable_mobile:1:%{HTTP_HOST},L,R]

I am also confused because my mobile version is /mobile and not m? so I don’t understand how Google managed to index the m parameter.

Also when I inserted the canonical url on the /mobile version and the alternate url on the desktop version google mobile search delivered the following (mobile-friendly) (mobile-friendly)

but before the changes: (mobile-friendly) (mobile-friendly)

So this tells me that google detected the mobile site regardless of the changes I made after. As you can see it says Mobile-Friendly ( So if it wasn’t for the ?m parameter I would not have any duplicate content. So how am I to fix this? It is a nightmare.

@admins - post #5 looks like it should be a new thread.


My advice is to remove code when you have no idea what it does (and it looks very convoluted to me, too).

As for your question about how to get rid of the /?m URI, that’s easy!

RewriteCond %{QUERY_STRING} ^m$ RewriteRule .? %{REQUEST_URI}? [R=301,L]

This looks for the m “key” in the query string with no value (that’s what you’ve shown in your example) and redirects to the same {REQUEST_URI} but the trailing ? removes any existing query string (i.e., the m).

Have a look at the (full and updated) article I’d written for SitePoint a few years ago at for a tutorial on mod_rewrite complete with examples.



Hi dklynn,

I can’t thank you enough for helping me resolve the ?m duplicate issue (lets hope now google updates and removes the duplicate urls).

I need your help for one more seo issue.

I get one test failure on Virante free tools 'Default Page Check: FAILED

Potential Duplicate Content Issues
WWW/Non-WWW Header Check: SUCCESS
You appear to not have an issue with www vs. non www
Google Cache Check: SUCCESS
You appear to not have an issue with www vs. non www in Googles Cache
Similarity Check: SUCCESS
You do not appear to have any pages omitted for being too similar in the top 1000 results of your site in Google.
Default Page Check: FAILED
You have not standardized your default pages meaning the following versions of your url return a 200/OK Header, which may cause duplicate content issues. The following extensions work:

404 Check: SUCCESS
You appear to be correctly returning a 404 error for pages that do not exist.

Any suggestions on how to fix this? thanks

Hi dklynn,

I forgot to ask now that I implemented the 301 redirect for the url parameter ?m do you think I should remove the canonical tag from the desktop version leaving only the alternate tag? Please let me know, thanks!

The canonical tag identifies which version of an address to use when there are multiple ways to access the same page - eg.,,, www, and the canonical tag says which of those four the search engine is to use since they are all the same page


Use that code before the other which segregates mobile from desktop. The code I used is for all visitors.

As for the https requests, I believe that it is a browser option whether to allow redirects or not.

Oh, as for your regex in the first post, ^$ is the empty {REQUEST_URI}. IMHO, I believe that you want merely .? to match EVERYTHING and, thus, redirect if your RewriteCond statements are matched.



Hi dklynn,

just when I thought everything was fixed I just checked Search Console and to my surprise I noticed another duplicate content issue as you can see below:


/index.html?m (new duplicate content last update 02 Nov 2015)

I do not understand the problem since I checked with
angular duplicate content and also with tools/ and
everything seems to be ok.

They all redirect to the canonical url or

Is there anything I am missing here or hopefully these errors will disappear with time (sometimes Search Console can be rather slow updating data)? Please help, thanks

Hi P_L,

I am not familiar with the Search Console and its rules. That said, at least I can make a few comments for your consideration:

  1. I would have used a query string of m=mobile rather than just a marker (m is what you’ve used).

  2. I would not ever use /?m (or /?m=mobile) as that relies on the proper setting of your DirectoryIndex and makes the server go through a lookup (for the first file in your DirectoryIndex listing it can find) before serving any content.

  3. IF your Search Console is important to you, you could make a circular redirection similar to the “Loopy Redirect” as I’d shown in “Redirect TO New Format” at In other words, you could match the ?m version of your URI, redirect to the clean version with an R-301 then back to the ?m{=mobile} version with an internal redirection.

  4. I think I would consider making a separate directory (if only for pseudo URIs) for mobile content. It would be easier to match ^mobile/whatever$ and redirect internally to whatever?m{=mobile} than trying to sort out what your Search Console is doing.

Yes, not much of an answer but it’s too early in the morning for me to be awake enough for a better answer - 'sorry.



Hi dklynn,

thank you as always for your great support :slight_smile:

Canonicals should be enough but Google does mess up and I guess the more clues I can give them, the better.

So I followed your advice utilizing 301 redirects that fixed the issue in angular duplicate content and on but did edit also the settings in the URL parameters section to tell Google that the parameter “m” do not change the page content, so it should now index only one representative URL.

That being said, I will have to wait to see the outcome in my webmaster tools duplicate title tags section!

At least now after editing the url parameters section there is no trace of the m parameter in the search engine. I just checked typing in the google address bar my


OMG! I was sufficiently awake to provide a useful answer? Horray!



1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.