Due to some issues in my site many pages are visible as duplicate using : www.example.com/page.html?task=view but it's content is exactly same as www.example.com/page.html.

One way is to use http 301 redirect from www.example.com/page.html?task=view to www.example.com/page.html when anybody fetches page with arguments. But links like www.example.com/page.html?task=view will remain visible to outside world.

Another way is canonicalization which I don't want to use as it is difficult to insert the tag in Joomla CMS.

I want to hide www.example.com/page.html?task=view from external world.

Is it possible to change the url from www.example.com/page.html?task=view to www.example.com/page.html ? I mean if there is href link of www.example.com/page.html?task=view in my web page, it should be visible to external world as without any arguments. This is different from using 301 to convert externally accessed page : www.example.com/page.html?task=view to without using arguments in .htaccess.

  • Have you thought about using jQuery show(), hide(), toggle() or any similar method so you can have /page.html and whatever is displayed with ?task=view hidden on the page. Or have a programmer code in some AJAX.
    – Anagio
    Oct 15, 2012 at 12:59
  • Well removing ?task=view will reduce urls and parameters making site better for Google.
    – AgA
    Oct 15, 2012 at 17:00
  • If you have both pages indexed Google will decide which to index. If you want only one page indexed i'd use AJAX/jQuery so only 1 URL was needed and not mess with redirects
    – Anagio
    Oct 15, 2012 at 17:07

4 Answers 4


You can use URL re-writing but, if you have 2 pages with the same content which uses querystrings, my research shows Google will not penalize you, they will simply ignore one of the pages (and my guess is the one with the querystring).

I would also consider though if you want this 'forwarder' in place to add it with code.


If you mean pages visibility to Googlebot, I recommend you to use their Webmaster tools panel like described here: http://support.google.com/webmasters/bin/answer.py?hl=en&answer=1235687 . It describes how you can set up you site parameters to avoid Google to crawl and index pages with identical content.

If you have not yet installed Google Webmater tools for you site, I recommend you to do so at https://www.google.com/webmasters/tools/

If you want to reach some invisibility of the pages from other search engines bots try some experiments with robots.txt file, like so:

User-agent: *
Disallow: /*?task=view

This will block all URLs containing "?task=view" to be crawled by robots.

  • Obviously I asked different question.
    – AgA
    Jun 14, 2012 at 2:33

I guess this is possible by using BOTH .htaccess 301 redirects and URL rewriting.


If your app / CMS works without that specific CGI parameter, you could strip the parameter via a rewrite rule, in either a .htaccess or httpd.conf file e.g.

RewriteEngine On

RewriteCond %{QUERY_STRING} task=view
RewriteRule page.html       %{REQUEST_URI}? [R=301,L]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.