Hi,
1. We're an older site so 150 "search" pages are already in Google's index and we don't want them to be.
2. We can add a disallow in Robots.txt but that won't take the pages our of the index.
3. We read we should put a noindex on the search page but I'm not sure where (which page) that should go on. Once I can do that, I think Google will eventually drop the pages from the index then I can put the robots.txt disallow back in.
Where should the noindex tag go (which page)?
Thanks
Barb
Add noindex to search URLS
-
- Commander (CMDR)
- Posts: 139
- Joined: Wed Mar 31, 2010 8:59 pm
-
- Commander (CMDR)
- Posts: 139
- Joined: Wed Mar 31, 2010 8:59 pm
Re: Add noindex to search URLS
OK, so I "tried" to follow the instructions on this post: I did this but got a server error.
viewtopic.php?f=65&t=18510&p=81048&hili ... age#p81048
There were 2 sets of instructions. I tried the set towards the bottom of the post where this line:
BindSearchResultsPanel();
Is replaced with this:
// ADD NOINDEX META TAG TO PREVENT BROWSERS FROM INDEXING THE PAGE
HtmlMeta keyword = new HtmlMeta();
keyword.Name = "robots";
keyword.Content = "noindex";
Page.Header.Controls.Add(keyword);
BindSearchResultsPanel();
Now, in the first post it mentions adding this to the top of the page (which I did not do). Is this perhaps what gave the server error, this missing line?
using System.Web.UI.HtmlControls;
Thanks
Barb
viewtopic.php?f=65&t=18510&p=81048&hili ... age#p81048
There were 2 sets of instructions. I tried the set towards the bottom of the post where this line:
BindSearchResultsPanel();
Is replaced with this:
// ADD NOINDEX META TAG TO PREVENT BROWSERS FROM INDEXING THE PAGE
HtmlMeta keyword = new HtmlMeta();
keyword.Name = "robots";
keyword.Content = "noindex";
Page.Header.Controls.Add(keyword);
BindSearchResultsPanel();
Now, in the first post it mentions adding this to the top of the page (which I did not do). Is this perhaps what gave the server error, this missing line?
using System.Web.UI.HtmlControls;
Thanks
Barb
Re: Add noindex to search URLS
Yes, you must add this line at the top. This will make controls available that you are using in other lines of code.Now, in the first post it mentions adding this to the top of the page (which I did not do). Is this perhaps what gave the server error, this missing line?
using System.Web.UI.HtmlControls;
-
- Commander (CMDR)
- Posts: 139
- Joined: Wed Mar 31, 2010 8:59 pm
Re: Add noindex to search URLS
Hi,
Yes, I finally tried that and It seems to be working. It takes forever to get stuff out of Google's index!
Thanks!
Barb
Yes, I finally tried that and It seems to be working. It takes forever to get stuff out of Google's index!
Thanks!
Barb
Re: Add noindex to search URLS
Glad that you have it all sorted!