Forum Moderators: phranque

Message Too Old, No Replies

Does robots meta tag need to be in head?

         

RobBroekhuis

5:27 pm on Oct 21, 2004 (gmt 0)

10+ Year Member



I have a page on a forum with links to my website - the page is built by the forum, with text (in my case, html code) inserted by me. I want to prevent the links from being followed by robots (I have other paths to these links that are more appropriate). Would it work to put a nofollow robots meta tag at the top of my content? After the page is built by the forum, the meta tag would be somewhere in the <body>, rather than in the <head> of the document. Any idea how the major engines treat dangling meta tags?
Rob

encyclo

5:44 pm on Oct 21, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you put the meta tag in the body rather than in the head, not only will it invalidate your page but you are very unlikely to be successful in blocking the links being spidered.

Worse than that, if a spider reads the tag and is confused by its position in the body, the page itself might not get indexed as a consequence, or the content might not be recognized (because the spider thinks it is still in the head section).

You will need to find a way of inserting the meta tag in the right place, or write out the links with Javascript to stop them being indexed.

RobBroekhuis

8:12 pm on Oct 21, 2004 (gmt 0)

10+ Year Member



Thanks for your feedback. I'm not too concerned if the page itself is indexed, nor whether the spider "recognizes" the content. I only want the links not to be followed, and don't know if that placement of the tag will have the desired effect. I can't use javascript - I'm sure the forum this goes into, although it graciously allows html code, would frown on script inclusion.
Rob

kaled

12:51 am on Oct 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's a guess, but a meta tag in the body would probably be respected.

If you are able to set the title of the page what would happen if you inserted some html of the form

title</title><meta .....>

You would be left with a stray </title> tag but neither browsers nor robots would object violently to this.

This isn't likely to work for various reasons but it might.

Kaled.

RobBroekhuis

11:26 am on Oct 22, 2004 (gmt 0)

10+ Year Member



Kaled, that's a cute idea. Reminds me of the tricks hackers play on database forms and querystrings ;-) But no, I can't set the title. For now, I've changed the dynamic pages being linked to to include a noindex tag if the link comes from the page in question. Not quite as good as a nofollow tag on the one page, but I don't want to risk upsetting the forum admins with improperly structured html.
Cheers
Rob