• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Stop SERPS from indexing 'showtemplate=false' pages
PostPosted: Mon Dec 17, 2012 12:43 am 
Offline
Forum Members
Forum Members

Joined: Wed Feb 11, 2009 6:30 pm
Posts: 63
Location: Toronto, Canada
I have a site that uses jquery and ajax to display the results of the form without using ajax. In order to display the results of the form in a div, I am using '&showtemplate=false' at the end of the URL to display only the results of the form and not the entire page within the output div.

Because of this, Google has index 2 copies of all of my pages - the template pages and the non-template pages.

If I search for this in the google search box: sitename:mysite.com
I see all of the pages that google has index.

I could have prevented google from indexing the 'showtemplate=flase' versions of my pages by including this in my .htaccess file:

\$1:
# Stop SERPs from indexing 'showtemplate=false' pages

#modify query string condition here to suit your needs
RewriteCond %{QUERY_STRING} (^|&)showtemplate=false [NC]
#set env var MY_SET-HEADER to 1
RewriteRule .* - [E=MY_SET_HEADER:1]

#if MY_SET_HEADER is present then set header
Header set X-Robots-Tag "noindex" env=MY_SET_HEADER


Ah well... live and learn!


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Stop SERPS from indexing 'showtemplate=false' pages
PostPosted: Mon Dec 17, 2012 9:57 am 
Offline
Power Poster
Power Poster

Joined: Sat Jan 22, 2005 11:19 am
Posts: 463
Thanks for the tip. Maybe I'm wrong but I was under the impression that '&showtemplate=false' was deprecated?


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting