DCSIMG
How To: Add Meta Tags to Pages in MOSS 2007 - Remember Sammy Jankis

How To: Add Meta Tags to Pages in MOSS 2007

Hi,

Here's a nice one to jump start the week: Meta Tags (or in particular "Meta Tags in MOSS 2007"). As you may have noticed, MOSS isn't too friendly with adding/changing Meta Tags for its Aspx pages. Not such a big issue if you're implementing an inner organizational portal but once you think about the Web – you might consider tagging your pages in ways to reflect in search engines. Well, after researching this issue a bit, I've found a nice little way to work around this but I've also came across a set of articles called "Death of a Meta Tag". I feel like I need to refer to those articles before talking about the possible solution since this could be a whole bunch of work for nothing. It looks like you could spend your time improving your search rank in much more useful ways than this. In other words, Microsoft probably gave up on Tags for a reason and you might as well be educated about it before implement Meta Tags on your own. Here are the links to the articles:

Ok. If you're still into developing it – that's not a hard task at all. Here's what you can do:

  1. Start with creating a new Rendering control. This control will be rendered in the header so this is where we'll add the logic and support for Meta Tags. You can find a very detailed information about this issue in the following MSDN article.
  2. The main thing you'll have to do is to override the RenderControl method and use the following code (example for Keywords):

    writer.Write("<meta name=\"keywords\" content=\"" + YOUR_KEYWORDS_HERE + "\" />");

    Now, since you're implementing this control - you can decide whether to use hard coded Meta Tags or read them from a DB/File.

  3. Open the relevant Master Page and add a new Content Place Holder (for example: <asp:ContentPlaceHolder id="PlaceHolderMetaTags" runat="server"/>) in the <head> section.
  4. The last thing is to add the new control you've created into the Place Holder in the following manner:

<PublishingWebControls:EditModePanel runat="server" id="metadataSection" SuppressTag="true" PageDisplayMode="Display">

<MyControls: MyMetadataFieldControl FieldName="MyMetadata" runat="server"></Mytag:HeadMetadataFieldControl>

</PublishingWebControls:EditModePanel>

   

That's it. Looks like a pretty easy task after all. However, if you had a brief look in the articles mentioned here - you would know no to expect it to affect the search ranking too much…

Bye,

Adir Ron.

Published Sunday, January 06, 2008 11:22 AM by Adir Ron

Comments

# Search Engine Optimization Direct &raquo; Blog Archive &raquo; How To: Add Meta Tags to Pages in MOSS 2007

Pingback from  Search Engine Optimization Direct  &raquo; Blog Archive   &raquo; How To: Add Meta Tags to Pages in MOSS 2007

Saturday, February 09, 2008 12:14 PM by deswatt

# re: How To: Add Meta Tags to Pages in MOSS 2007

vacuum cleaner, vacuum cleaners

<a href=" xinx.247ihost.com ">vacuum cleaner</a>

<a href=xinx.247ihost.com>vacuum cleaner</a>

http://deswa.narod.ru/up.html

Thursday, March 06, 2008 10:34 AM by weddingc

# re: How To: Add Meta Tags to Pages in MOSS 2007

Saturday, March 08, 2008 2:44 AM by blackbox

# re: How To: Add Meta Tags to Pages in MOSS 2007

Sunday, March 09, 2008 9:20 AM by xbox

# re: How To: Add Meta Tags to Pages in MOSS 2007

Monday, March 10, 2008 5:22 PM by limogesb

# re: How To: Add Meta Tags to Pages in MOSS 2007

Monday, March 10, 2008 10:25 PM by boxcarra

# re: How To: Add Meta Tags to Pages in MOSS 2007

Tuesday, March 11, 2008 11:28 AM by plastics

# re: How To: Add Meta Tags to Pages in MOSS 2007

Wednesday, March 12, 2008 3:08 AM by booksfro

# re: How To: Add Meta Tags to Pages in MOSS 2007

Wednesday, March 12, 2008 7:01 PM by treasure

# re: How To: Add Meta Tags to Pages in MOSS 2007

Thursday, March 13, 2008 10:01 AM by weekendb

# re: How To: Add Meta Tags to Pages in MOSS 2007

Sunday, March 16, 2008 11:53 AM by maninthe

# re: How To: Add Meta Tags to Pages in MOSS 2007

Monday, March 17, 2008 12:13 AM by heart-sh

# re: How To: Add Meta Tags to Pages in MOSS 2007

Monday, March 17, 2008 11:38 PM by lunchbox

# re: How To: Add Meta Tags to Pages in MOSS 2007

Tuesday, March 18, 2008 9:34 PM by smallbox

# re: How To: Add Meta Tags to Pages in MOSS 2007

Monday, March 24, 2008 1:56 PM by ornatebo

# re: How To: Add Meta Tags to Pages in MOSS 2007

Thursday, March 27, 2008 6:49 AM by candlebo

# re: How To: Add Meta Tags to Pages in MOSS 2007

Thursday, March 27, 2008 6:24 PM by mailboxe

# re: How To: Add Meta Tags to Pages in MOSS 2007

Saturday, March 29, 2008 11:10 PM by Replica watches

# re: How To: Add Meta Tags to Pages in MOSS 2007

Sunday, March 30, 2008 1:07 PM by Replica watches

# re: How To: Add Meta Tags to Pages in MOSS 2007

Tuesday, April 01, 2008 1:04 AM by favorbox

# re: How To: Add Meta Tags to Pages in MOSS 2007

Wednesday, April 09, 2008 11:33 AM by mailbox

# re: How To: Add Meta Tags to Pages in MOSS 2007

Wednesday, April 09, 2008 6:32 PM by utahboxe

# re: How To: Add Meta Tags to Pages in MOSS 2007

Thursday, April 10, 2008 3:08 PM by boxtopsf

# re: How To: Add Meta Tags to Pages in MOSS 2007

Friday, April 11, 2008 1:00 AM by toyboxmp

# re: How To: Add Meta Tags to Pages in MOSS 2007

Tuesday, April 15, 2008 12:49 AM by boxfullo

# re: How To: Add Meta Tags to Pages in MOSS 2007

Wednesday, April 16, 2008 6:00 PM by pringleb

# re: How To: Add Meta Tags to Pages in MOSS 2007

Thursday, April 17, 2008 10:17 AM by windowbo

# re: How To: Add Meta Tags to Pages in MOSS 2007

Friday, April 18, 2008 6:53 AM by jackinth

# re: How To: Add Meta Tags to Pages in MOSS 2007

Friday, April 18, 2008 9:42 AM by serialbo

# re: How To: Add Meta Tags to Pages in MOSS 2007

Sunday, April 20, 2008 6:37 AM by cablebox

# re: How To: Add Meta Tags to Pages in MOSS 2007

Sunday, April 20, 2008 9:30 PM by planterb

# re: How To: Add Meta Tags to Pages in MOSS 2007

Monday, April 21, 2008 3:48 PM by catlitte

# re: How To: Add Meta Tags to Pages in MOSS 2007

Tuesday, April 22, 2008 5:30 AM by commentb

# re: How To: Add Meta Tags to Pages in MOSS 2007

Tuesday, April 22, 2008 12:18 PM by toyboxmp

# re: How To: Add Meta Tags to Pages in MOSS 2007

Wednesday, April 23, 2008 10:11 PM by treasure

# re: How To: Add Meta Tags to Pages in MOSS 2007

Thursday, April 24, 2008 7:24 PM by sandbox

# re: How To: Add Meta Tags to Pages in MOSS 2007

Thursday, April 24, 2008 11:35 PM by boxofsun

# re: How To: Add Meta Tags to Pages in MOSS 2007

Sunday, April 27, 2008 11:30 PM by scrollbo

# re: How To: Add Meta Tags to Pages in MOSS 2007

Monday, April 28, 2008 5:22 PM by slingbox

# re: How To: Add Meta Tags to Pages in MOSS 2007

Friday, May 02, 2008 12:08 AM by litterbo

# re: How To: Add Meta Tags to Pages in MOSS 2007

Friday, May 02, 2008 9:51 AM by boxelder

# re: How To: Add Meta Tags to Pages in MOSS 2007

Friday, May 02, 2008 10:01 PM by xboxgame

# re: How To: Add Meta Tags to Pages in MOSS 2007

Tuesday, May 06, 2008 9:33 AM by fibergla

# re: How To: Add Meta Tags to Pages in MOSS 2007

Leave a Comment

(required) 
(required) 
(optional)
(required) 

Enter the numbers above: