none
SEO in SharePoint

    Pertanyaan

  •  

    I'm looking to optimize my websites search engine visibility. it was build with SharePoint using page layouts etc. Now, my question is, where can I input meta tags and page title etc? For instance, I put the home page with the title of "My Company - Home" but it shows up as the web address http://www.mycompant.com/Pages/default.apsx, so how can i fix that if in the page settings, it seems right.


    I'm hoping that I am just missing something simple, but any help would be appreciated.

    Thank you very much.

     

    14 Juli 2008 16:22

Jawaban

  • Yes, you can add your customized title to the page by SharePoint Designer 2007.

    Here are the detailed steps:

    1.     Open your site in SharePoint Designer 2007

    2.     Open the page you want to modify (e.g.: default.aspx) and change to Code View, navigate to the PlaceHolderPageTitle in the top of the page. And add your customer code in the tag.

     

    Code Snippet

     <asp:Content ContentPlaceHolderId="PlaceHolderPageTitle" runat="server">

           <SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,multipages_homelink_text%>" EncodeMethod="HtmlEncode"/> -

           <SharePoint:ProjectProperty Property="Title" runat="server"/>

    </asp:Content>

     

    3.     If you want to add a customized title to all the pages, you can modify the default.master file in _catalogs\mastepage folder. Navigate to the Title tag in the Head tag, and add your customer code in the Title tag.

     

    Code Snippet
    <Title ID=onetidTitle><asp:ContentPlaceHolder id=PlaceHolderPageTitle runat="server"/></Title>

     

     

    Let me know if you have any further questions.

    -lambert

    16 Juli 2008 3:58

Semua Balasan

  •  

    If that is the URL in your web application then you will need to change it in the Alternate Access mappings in Central Admin - Operations.
    14 Juli 2008 17:27
  • That was just a sample URL I put in there.....

    14 Juli 2008 18:15
  • Yes, you can add your customized title to the page by SharePoint Designer 2007.

    Here are the detailed steps:

    1.     Open your site in SharePoint Designer 2007

    2.     Open the page you want to modify (e.g.: default.aspx) and change to Code View, navigate to the PlaceHolderPageTitle in the top of the page. And add your customer code in the tag.

     

    Code Snippet

     <asp:Content ContentPlaceHolderId="PlaceHolderPageTitle" runat="server">

           <SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,multipages_homelink_text%>" EncodeMethod="HtmlEncode"/> -

           <SharePoint:ProjectProperty Property="Title" runat="server"/>

    </asp:Content>

     

    3.     If you want to add a customized title to all the pages, you can modify the default.master file in _catalogs\mastepage folder. Navigate to the Title tag in the Head tag, and add your customer code in the Title tag.

     

    Code Snippet
    <Title ID=onetidTitle><asp:ContentPlaceHolder id=PlaceHolderPageTitle runat="server"/></Title>

     

     

    Let me know if you have any further questions.

    -lambert

    16 Juli 2008 3:58
  • Lambert,

    I used similar approach as you describe.
    When I look the HTML that gets rendered, there is the title tag containing my customized title text but in addition there is a second title tag visible.
    Any idea why this happens? It appears as if Sharepoint would render an additional title tag into the source. The master page as well as the page layouts I use do not have any markup.

    Thanks for any hint.

    Jo
    18 Juni 2009 19:41
  • Hey lambert, this is an issue we have encountered on ALL our sharepoint websites, As soon as you try and add custom text to the title tag in the masterpage (not pagelayout) a second blank title tag is generated at the bottom of the head element.

    This is a bug in sharepoint that i haven't found a work-around for so far...


    <Title ID=onetidTitle><asp:ContentPlaceHolder id=PlaceHolderPageTitle  runat="server"/> - Companyname</Title>
    or
    <Title ID=onetidTitle><asp:ContentPlaceHolder id=PlaceHolderPageTitle  runat="server"></asp:ContentPlaceHolder> - Companyname</Title>
    or
    <Title ID=onetidTitle>Companyname - <asp:ContentPlaceHolder id=PlaceHolderPageTitle  runat="server"></asp:ContentPlaceHolder></Title>


    doesn't render "- companyname" at all in the cases i'm looking at now.

    HOWEVER,
    if you include the suffix/prefix for the title in a literal enclosure, then it does work:


    <Title ID=onetidTitle><asp:ContentPlaceHolder id=PlaceHolderPageTitle  runat="server"></asp:ContentPlaceHolder><asp:Literal runat="server" id="Literal1"> - CompanyName</asp:Literal></Title>



    02 Oktober 2009 9:01
  • When I try to use this method within a webpart, I get "Content controls have to be top-level controls in a content page..." I don't get this when I use it outside it (on a non-master page). I would like to be able to dynamically change the page's title using list data. How would this best be done?
    17 Nopember 2009 4:39
  • Hi,

    I am also facing the same issue. I think it's some issue in SharePoint. Some how it overwrites the text inside title tag.


    -Nikhil Doomra (SharePoint Developer)

    21 April 2012 14:28