I've searched the web & can't find an answer to this.

Is it possible to successfully use Response.AddHeader for a robots meta tag?

For example, I want to do

<%
IF request("PageID") = 252 THEN Response.AddHeader "robots", "noindex"
:
%>

Re: Response.Addheader by Bob

Bob
Wed May 14 20:29:37 CDT 2008


"Tony" <TonyB77@yahoo.com> wrote in message
news:OgmjFletIHA.1772@TK2MSFTNGP03.phx.gbl...
> I've searched the web & can't find an answer to this.
>
> Is it possible to successfully use Response.AddHeader for a robots meta
> tag?
>
> For example, I want to do
>
> <%
> IF request("PageID") = 252 THEN Response.AddHeader "robots", "noindex"
> :
> %>

It looks like you're confusing response headers with the HTML "head"
section; the two are entirely unrelated.

The response header is the data block sent back to the browser by the web
server which passes things like the result code, cookies, etc., and which
you never get to see (unless you're doing "raw" browsing with something like
SamSpade or Lynx).

The HTML "head" section is actually simply a part of the HTML stream, which
the server pays no attention to as a separate entity from the "body" or any
other part of the stream. It's this location that you'll need to add your
"robots" directive to, as a meta tag (you'll find plenty of references to
the "robots" meta tag using Google).

- Bob.



Re: Response.Addheader by Dave

Dave
Thu May 15 09:21:29 CDT 2008

"Bob Milutinovic" wrote:
> The response header is the data block sent back to the browser by
> the web server which passes things like the result code, cookies,
> etc., and which you never get to see (unless you're doing "raw"
> browsing with something like SamSpade or Lynx).

On a side note, you can add a [Headers] tab to the [Page Info] window in
Firefox, by adding the "Live HTTP Headers" extension:
https://addons.mozilla.org/en-US/firefox/addon/3829

In addition, you can use the extension to capture a log of all[1]
request/response headers, and use its "replay" feature to tweak your request
headers before re-submitting a request (this includes all headers and even
POST body content).



[1] You can filter out immaterial request info, such as image and css
requests

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.


Re: Response.Addheader by Tony

Tony
Thu May 15 21:08:59 CDT 2008

"Bob Milutinovic" wrote...
>
> "Tony" wrote ...
> > I've searched the web & can't find an answer to this.
> >
> > Is it possible to successfully use Response.AddHeader for a robots meta
> > tag?
> >
> > For example, I want to do
> >
> > <%
> > IF request("PageID") = 252 THEN Response.AddHeader "robots", "noindex"
> > :
> > %>
>
> It looks like you're confusing response headers with the HTML "head"
> section; the two are entirely unrelated.

No, I'm afraid that you are confused.

What you are discussing is correctly called the HTTP Headers, not the "response
headers".


>
> The response header is the data block sent back to the browser by the web
> server which passes things like the result code, cookies, etc., and which
> you never get to see (unless you're doing "raw" browsing with something like
> SamSpade or Lynx).
>
> The HTML "head" section is actually simply a part of the HTML stream, which
> the server pays no attention to as a separate entity from the "body" or any
> other part of the stream. It's this location that you'll need to add your
> "robots" directive to, as a meta tag (you'll find plenty of references to
> the "robots" meta tag using Google).

Duh.

You can modify some HTTP meta response by adding comments within the <HEAD></HEAD>
section.

My original question, is do search bots bother to read the HTTP headers for a robots
name/content pair.





Re: Response.Addheader by Tony

Tony
Thu May 15 21:13:04 CDT 2008

"Tony" wrote...
:> You can modify some HTTP meta response by adding comments within the <HEAD></HEAD>
> section.

Sorry spellcheck.

That should have read:
You can modify some HTTP meta response by adding CONTENT within the <HEAD></HEAD>
section.





Re: Response.Addheader by Dave

Dave
Fri May 16 00:32:19 CDT 2008

"Tony" wrote:
> My original question, is do search bots bother to read the
> HTTP headers for a robots name/content pair.

You might just as well ask if they bother to read the META tag versions.
When we went through the process of selecting a search appliance for our
internal servers, several vendors confessed to us that they do not obey such
tags.


--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.


Re: Response.Addheader by Anthony

Anthony
Fri May 16 01:25:43 CDT 2008

"Tony" <TonyB77@yahoo.com> wrote in message
news:ekHtYnvtIHA.1436@TK2MSFTNGP05.phx.gbl...
> "Bob Milutinovic" wrote...
> >
> > "Tony" wrote ...
> > > I've searched the web & can't find an answer to this.
> > >
> > > Is it possible to successfully use Response.AddHeader for a robots
meta
> > > tag?
> > >
> > > For example, I want to do
> > >
> > > <%
> > > IF request("PageID") = 252 THEN Response.AddHeader "robots",
"noindex"
> > > :
> > > %>
> >
> > It looks like you're confusing response headers with the HTML "head"
> > section; the two are entirely unrelated.
>
> No, I'm afraid that you are confused.
>
> What you are discussing is correctly called the HTTP Headers, not the
"response
> headers".

The term HTTP Headers is general term to the set of headers defined in the
HTTP spec. Some HTTP Headers only have meaning as part of the Request phase
of a HTTP session, some only have meaning in the Response phase and a few
can be used both in the request and the response.

When refering to HTTP headers that are sent as part of the response we tend
to use the phrase 'Response Headers'. The Response.AddHeader is a method in
ASP we use to add such 'Response Headers'.

>
>
> >
> > The response header is the data block sent back to the browser by the
web
> > server which passes things like the result code, cookies, etc., and
which
> > you never get to see (unless you're doing "raw" browsing with something
like
> > SamSpade or Lynx).
> >
> > The HTML "head" section is actually simply a part of the HTML stream,
which
> > the server pays no attention to as a separate entity from the "body" or
any
> > other part of the stream. It's this location that you'll need to add
your
> > "robots" directive to, as a meta tag (you'll find plenty of references
to
> > the "robots" meta tag using Google).
>
> Duh.
>
> You can modify some HTTP meta response by adding comments within the
<HEAD></HEAD>
> section.
>
> My original question, is do search bots bother to read the HTTP headers
for a robots
> name/content pair.
>

The actual header you are after is X-Robots-Tag :-

Response.AddHeader "X-Robots-Tag", "noindex"




--
Anthony Jones - MVP ASP/ASP.NET



Re: Response.Addheader by Tony

Tony
Fri May 16 10:36:19 CDT 2008

"Anthony Jones" wrote...
:
> > My original question, is do search bots bother to read the HTTP headers
>> for a robots
> > name/content pair.
> >
>
> The actual header you are after is X-Robots-Tag :-
>
> Response.AddHeader "X-Robots-Tag", "noindex"
>

Ah HA!

And I found a wealth of new information when I searched for "X-Robots-Tag"

THANKS, Anthony!!!

Tony






Re: Response.Addheader by Adrienne

Adrienne
Sat May 17 16:13:33 CDT 2008

Gazing into my crystal ball I observed "Tony" <TonyB77@yahoo.com>
writing in news:ekHtYnvtIHA.1436@TK2MSFTNGP05.phx.gbl:

> My original question, is do search bots bother to read the HTTP
> headers for a robots name/content pair.
>
>

The well behaving bots do honor noindex, nofollow within a Meta tag in the
Head element. Some, including Google, also honor rel="nofollow", good if
you want to have a link to an outside host, but do not want SE to follow
it. You will also, if you have not already done so, want make use of a
robots.txt file [www.robotstxt.org/].

Understand that misbehaving bots will ignore all your efforts.

There are helpful people at alt.internet.search-engines that-a-way --->

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share