Hi, apologies, I ticked my earlier question on this as having been sorted - but on trying the solutions two kind people gave, it doesn't work. My goal is to have different Meta information on my Content pages - different from the MasterPage that is. My Content
page contained this....
As you can see above, I inserted into position exactly as the answer instructed, but it didn't work. The result was, when I loaded the page the original Meta descriptions were still in place from the MasterPage, they were not replaced as I'd hoped, instead
this extra line was found in the source code.....
Did I understand the instructions given to me I wonder?
I really am very new at this, very new - I even need to be told about full-stops, and noddy stuff please. I still can't get my contents page to have their own Meta lines, they still keep reading those from the MasterPage - would there be any other suggestions
please?
First, if you're very new at this, then let me make a couple of suggestions....
1) Keep your code out of the .aspx files. You (and anyone who has to look at it) will be much happier in the long run.
2) If you add the code you show above in your page load, it will add the metadata to the header. When the page is in the browser, do a view source, and you will see it.
3) I assume you're adding keywords to the metadata for search engines... DONT BOTHER. Add a description tag so the when the page is found, it may choose to display a snippet to your liking. But adding KEYWORDS will not affect your ranking... maybe 10
years ago, but not today. There's lots of good SEO information on the google webmasters forum, check it out.
Good luck. ~Rick
If your not seeing your metadata, do a view source and post it here... would like to see it.
Please mark the post as ANSWER if it helps you
Disclaimer: Just my opinion. Not my employer or anyone else....
Keywords go in the source. The description meta goes in the source too.
Page.title ="LisaMac's page" /* is a built in to page title. */
You'll be in the search engines soon. 1-7 days. You won't be first but you should be able to search for your pages and find them if you filter to only your domain.
2) If you add the code you show above in your page load, it will add the metadata to the header. When the page is in the browser, do a view source, and you will see it.
Yes I saw it in the browser view source - but I was trying to 'replace' the Meta information in my header, not 'add' to it. That is, I was trying to put different Meta info in my Content page, instead of it keep reading from the MasterPage every time - and
when I added the code above it never replaced, as I was trying to do. But not to worry as your number 3 might solve it.......
Rick Matthys
3) I assume you're adding keywords to the metadata for search engines... DONT BOTHER. Add a description tag so the when the page is found, it may choose to display a snippet to your liking. But adding KEYWORDS will not affect your ranking... maybe 10 years
ago, but not today. There's lots of good SEO information on the google webmasters forum, check it out.
This comes very close to what I need. You see Google keeps putting up identical snippets, regardless of which page of mine is found, yet I want each page to have its own snippet. So maybe I asked the wrong question (apologies for that) and maybe your mention
of a 'description tag' will do the trick for me? How do I insert one of those? (you have to be precise, you know how thick I am) and on which line/page/other do I put it on?
As you know, depending on how frequently your site has been changing (among other factors), it may take a little while before your page is reindex. When it does get reindexed, you should see some new snippets if you add the tag below:
As you know, depending on how frequently your site has been changing (among other factors), it may take a little while before your page is reindex. When it does get reindexed, you should see some new snippets if you add the tag below:
Thanks for responding. Your last sentence, about seeing the new snippets by adding the tag, brings me back full circle, to the very reason why I started asking my question, and which I still can't resolve.......? You see, I need to add different tags to
my Content pages, different from those in my MasterPage. If I just add what you suggested that would not replace the ones my pages read from the Master. And if I add what was suggested to me earlier, that also did not replace the info being read from the
Master - and that is what my problem is?
All of my tags (I've been calling it Meta info, but I mean the same as what you're talking about), well all of these are identical across my site, whichever page Google spiders it still reads the same Meta stuff, the same tags or whatever this stuff is called
- and I need each page to show different snippets on Google. I've checked the source view of every page in my browser, it all reads identical. I'm struggling....?
What about if I did this...... just omit any of those Meta lines (or tags or whatever their name is - there's rows of them) from my MasterPage. Just don't put any of it in there? Then, everytime I add a new page just plonk it all in there? Different for
each page of course. (which is what I'm after, so that I have different Google snippets). I could do that, yes?
Your welcome I'm on a ramdom acts of worldwide kindness kick these days. The search engine sees what goes to the browser (view source). I have a generic description on my master page in case I forget to put a description in somewhere.
You probably don't want to add a description metatag to your masterpage. The description for each page should be unique so it makes sense just to include them in content pages. But, if you have metatags in your
master and want to update their info, then do the following:
In the master page, add a content holder for your metatags:
<asp:ContentPlaceHolder id="metatags" runat="server">
<meta name="description" content="Show this snippet if no description tag in content page" />
</asp:ContentPlaceHolder>
In the content pages, overwrite the master page metatags by adding:
You probably don't want to add a description metatag to your masterpage. The description for each page should be unique so it makes sense just to include them in content pages.
There you go. That's the answer. You see I knew the description tags had to be unique, that's what I've been trying to say all along, and trying to learn how to do that - but what I didn't know (and after all this, your one little line clarifies it all for
me) what I didn't know was that I did NOT have to put a description metatag on my masterpage in the first instance. All this time I thought it was important for it to be there on the masterpage, prior to producing all my Content pages (hence struggling to
make my Content pages have different description tags).
For me the answer is not to put them on my Masterpage in the first place. But for any future readers coming across this page, if you still want to put a description tag on your Masterpage - and have different description tags on your content pages - then
the answer that Rick gave immediately above, works. I tried it. I inserted the asp ContentPlaceHolder - all as he described in his answer - and it works.
Many many thanks. You guys that respond to these queries are so helpful.
LisaMac
Member
2 Points
21 Posts
Putting Meta info on Content pages
Feb 15, 2009 06:00 PM|LINK
Hi, apologies, I ticked my earlier question on this as having been sorted - but on trying the solutions two kind people gave, it doesn't work. My goal is to have different Meta information on my Content pages - different from the MasterPage that is. My Content page contained this....
<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" %>
<script runat="server"></script>
<asp:Content ID="Content1" ContentPlaceHolderID="leftContent" Runat="Server"></asp:Content>I tried to add what the two respondents told me. The first change I made to my Content page, using the method suggested to me, looked like this....
<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" %> <script runat="server" type = "text/VB" >Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim meta As HtmlMeta
meta = New HtmlMeta()
meta.Name = "keywords"meta.Content = "sas, sas, sas, sas"Page.Header.Controls.Add(meta)
End Sub</script
<asp:Content ID="Content1" ContentPlaceHolderID="leftContent" Runat="Server"></asp:Content>As you can see above, I inserted into position exactly as the answer instructed, but it didn't work. The result was, when I loaded the page the original Meta descriptions were still in place from the MasterPage, they were not replaced as I'd hoped, instead this extra line was found in the source code.....
<meta name="keywords" content="sas, sas, sas, sas" />Did I understand the instructions given to me I wonder?
I really am very new at this, very new - I even need to be told about full-stops, and noddy stuff please. I still can't get my contents page to have their own Meta lines, they still keep reading those from the MasterPage - would there be any other suggestions please?
Regards, LisaMac
Rick Matthys
Contributor
2794 Points
406 Posts
Re: Putting Meta info on Content pages
Feb 15, 2009 09:40 PM|LINK
Hello Lisa,
First, if you're very new at this, then let me make a couple of suggestions....
1) Keep your code out of the .aspx files. You (and anyone who has to look at it) will be much happier in the long run.
2) If you add the code you show above in your page load, it will add the metadata to the header. When the page is in the browser, do a view source, and you will see it.
3) I assume you're adding keywords to the metadata for search engines... DONT BOTHER. Add a description tag so the when the page is found, it may choose to display a snippet to your liking. But adding KEYWORDS will not affect your ranking... maybe 10 years ago, but not today. There's lots of good SEO information on the google webmasters forum, check it out.
Good luck. ~Rick
If your not seeing your metadata, do a view source and post it here... would like to see it.
Disclaimer: Just my opinion. Not my employer or anyone else....
Danny117
Star
11160 Points
1932 Posts
Re: Putting Meta info on Content pages
Feb 15, 2009 09:58 PM|LINK
Your doing great!
Keywords go in the source. The description meta goes in the source too.
Page.title ="LisaMac's page" /* is a built in to page title. */
You'll be in the search engines soon. 1-7 days. You won't be first but you should be able to search for your pages and find them if you filter to only your domain.
Me on linked in
LisaMac
Member
2 Points
21 Posts
Re: Putting Meta info on Content pages
Feb 16, 2009 04:21 AM|LINK
Yes I saw it in the browser view source - but I was trying to 'replace' the Meta information in my header, not 'add' to it. That is, I was trying to put different Meta info in my Content page, instead of it keep reading from the MasterPage every time - and when I added the code above it never replaced, as I was trying to do. But not to worry as your number 3 might solve it.......
This comes very close to what I need. You see Google keeps putting up identical snippets, regardless of which page of mine is found, yet I want each page to have its own snippet. So maybe I asked the wrong question (apologies for that) and maybe your mention of a 'description tag' will do the trick for me? How do I insert one of those? (you have to be precise, you know how thick I am) and on which line/page/other do I put it on?
Cheers LisaMac
LisaMac
Member
2 Points
21 Posts
Re: Putting Meta info on Content pages
Feb 16, 2009 04:24 AM|LINK
You're always nice to me. You were real friendly in my other question last week. Thanks - it makes me feel comfortable.
Kind Regards, LisaMac
Rick Matthys
Contributor
2794 Points
406 Posts
Re: Putting Meta info on Content pages
Feb 16, 2009 06:03 AM|LINK
Hello LisaMac,
As you know, depending on how frequently your site has been changing (among other factors), it may take a little while before your page is reindex. When it does get reindexed, you should see some new snippets if you add the tag below:
<meta name="Description" content="Description here....." />
If you post your site, i'd be glad to take a peek from an SEO perspective....
~Rick
Disclaimer: Just my opinion. Not my employer or anyone else....
LisaMac
Member
2 Points
21 Posts
Re: Putting Meta info on Content pages
Feb 16, 2009 09:34 AM|LINK
Thanks for responding. Your last sentence, about seeing the new snippets by adding the tag, brings me back full circle, to the very reason why I started asking my question, and which I still can't resolve.......? You see, I need to add different tags to my Content pages, different from those in my MasterPage. If I just add what you suggested that would not replace the ones my pages read from the Master. And if I add what was suggested to me earlier, that also did not replace the info being read from the Master - and that is what my problem is?
All of my tags (I've been calling it Meta info, but I mean the same as what you're talking about), well all of these are identical across my site, whichever page Google spiders it still reads the same Meta stuff, the same tags or whatever this stuff is called - and I need each page to show different snippets on Google. I've checked the source view of every page in my browser, it all reads identical. I'm struggling....?
What about if I did this...... just omit any of those Meta lines (or tags or whatever their name is - there's rows of them) from my MasterPage. Just don't put any of it in there? Then, everytime I add a new page just plonk it all in there? Different for each page of course. (which is what I'm after, so that I have different Google snippets). I could do that, yes?
LisaMac
Danny117
Star
11160 Points
1932 Posts
Re: Putting Meta info on Content pages
Feb 16, 2009 10:36 AM|LINK
Your welcome I'm on a ramdom acts of worldwide kindness kick these days. The search engine sees what goes to the browser (view source). I have a generic description on my master page in case I forget to put a description in somewhere.
Me on linked in
Rick Matthys
Contributor
2794 Points
406 Posts
Re: Putting Meta info on Content pages
Feb 16, 2009 03:15 PM|LINK
Good morning,
You probably don't want to add a description metatag to your masterpage. The description for each page should be unique so it makes sense just to include them in content pages. But, if you have metatags in your master and want to update their info, then do the following:
In the master page, add a content holder for your metatags:
<asp:ContentPlaceHolder id="metatags" runat="server"> <meta name="description" content="Show this snippet if no description tag in content page" /> </asp:ContentPlaceHolder>In the content pages, overwrite the master page metatags by adding:
<asp:Content ID="Content1" ContentPlaceHolderID="metatags" Runat="Server"> <meta name="description" content="Overwrite description in master" /> </asp:Content>This will replace the metatags in the master page instead of just adding more.
Hope this helps... ~Rick
Disclaimer: Just my opinion. Not my employer or anyone else....
LisaMac
Member
2 Points
21 Posts
Re: Putting Meta info on Content pages
Feb 16, 2009 05:40 PM|LINK
There you go. That's the answer. You see I knew the description tags had to be unique, that's what I've been trying to say all along, and trying to learn how to do that - but what I didn't know (and after all this, your one little line clarifies it all for me) what I didn't know was that I did NOT have to put a description metatag on my masterpage in the first instance. All this time I thought it was important for it to be there on the masterpage, prior to producing all my Content pages (hence struggling to make my Content pages have different description tags).
For me the answer is not to put them on my Masterpage in the first place. But for any future readers coming across this page, if you still want to put a description tag on your Masterpage - and have different description tags on your content pages - then the answer that Rick gave immediately above, works. I tried it. I inserted the asp ContentPlaceHolder - all as he described in his answer - and it works.
Many many thanks. You guys that respond to these queries are so helpful.
Kind Regards,
LisaMac