MOSS SEO – Robots.txt

It’s fairly easy to add a robots.txt file to your public anonymous MOSS site. Just open up your root site in SharePoint Designer. Right-click the top folder with your site URL and select New – SharePoint Content. Click the Page tab, select Text File and click OK.

Add the robots.txt file content and save it as “robots.txt”. That’s it!

Make sure the file is accessible to search engines by going to your site URL with a “/robots.txt” at the end. You should see the contents of your robots.txt file in the browser.

Advertisements

Creating an SEO Page Title

We needed to change all of our page titles to optimize them for the search engines (SEO) but we used the page titles in all of our site navigation and we didn’t want the SEO title used in our navigation. Here’s a fairly simple solution but you have to implement it very carefully because it’s really easy to bring your entire site down with one master page publish.

The overall solution is to add a new field to your pages and then tell your master pages to use that new field for the page title. Before you start this process you should 1. Make a list of all of the master pages that will use this new field and 2. Make a list of all of the page layouts that are used by those master pages. You will be modifying all of them!

Steps

  1. Create a new site column called SEOPageTitle
  2. Add the column to your document content type(s)
  3. Change the field where the master page is pulling the page title
     <title><asp:ContentPlaceHolder id=”PlaceHolderSEOPageTitle” runat=”server”/></title>
  4. Move the default page title placeholder to a hidden ContentPlaceHolder control
    Look for this      <asp:panel visible=”false” runat=”server”>
    Add this after it      <asp:ContentPlaceHolder id=”PlaceHolderPageTitle” runat=”server”/>
  5. Check-in the master pages and make sure nothing breaks 🙂
  6. Add a placeholder control to all of the page layouts that will be accessed by the master pages. We added this just above the PageTitle ContentPlaceHolder.
    <asp:Content ContentPlaceholderID=”PlaceHolderSEOPageTitle” runat=”server”>
     <SharePointWebControls:FieldValue id=”SEOPageTitleID” FieldName=”SEOPageTitle” runat=”server”/>
    </asp:Content>
  7. Check-in all of your page layouts

That should be it. If you did everything in the correct order, your site never went down. Just a warning… We had a lot of “strange” errors while we were making these changes. We seemed to get different results on test and production at times, so good luck… 🙂

Now you just need to update all of the pages with a new SEO title

Interface Change Links

Hide Sign In Link
http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=1803046&SiteID=17

Make Master Pages Available to all Site Collections: Create a Feature
http://www.heathersolomon.com/blog/articles/servermstpageforsitecollect_feature.aspx

Restrict People Picker to users in site collection
http://blogs.msdn.com/joelo/archive/2006/09/19/762389.aspx

Anonymous Users In SharePoint – Controlling What They See – SPSecurityTrimmedControl
http://blogs.devhorizon.com/reza/?p=508

Modifying Dataview Filtering
http://blogs.msdn.com/sharepointdesigner/archive/2007/04/24/spdatasource-and-rollups-with-the-data-view.aspx