When you create a public facing MOSS site using the publishing feature, all of the pages are stored in a “Pages” document library. MOSS will automatically redirect the user to the page designated as the default page in the Pages library when they go to the site URL.
(http://www.mosssite.com redirects to http://www.mosssite.com/pages/default.aspx)
This redirection is a 302 temporary server-side redirection. Redirecting URLs using 302-Temporary redirection is a non-search-engine-friendly technique. To resolve this issue it is recommended changing the server side redirection from a 302-Temporary Redirection to a 301-Permanent Redirection. A 301 redirect is the most efficient and search engine friendly method for web page redirection.
There are several ways to change the 302 to a 301 redirection (just Google it.) I solved this problem with a simple utility that was already installed on the web server called “ISAPI Rewrite”. ISAPI Rewrite is a free utility used to “rewrite” URLs at the IIS level, before the request is returned to the client. This utility can be used to solve many different issues (we use it to forward old URLs to the new location.) In this case we use it to create a permanent redirect to the default page on the site.
After you install ISAPI Rewrite Lite on the web server you can modify the “httpd.ini” to configure the 301 redirect. Just add the following in red to your configuration file.
This adds a trailing slash to all URLs that don’t have a page at the end
# Fix missing trailing slash
RewriteRule ^([^.?]+[^.?/])$ $1/ [R]
This looks for the correct host site and then redirects if the URL is just the host name
# Pages Redirect – Change 302 to 301 redirect
RewriteCond Host: (www\.)?mosssite\.com
RewriteRule / http\://www.mosssite.com/pages/default.aspx [I,RP]
Note: ISAPI Rewrite runs it’s rules on ALL incoming traffic on your server so make sure the rules work for all of your sites! As always, TEST IT FIRST!
Want to test it? Go to http://www.urivalet.com and enter your site URL without the http://. Test it using HTTP/1.0 and HTTP/1.1. The Object Details will show you what type of redirection is used on your site.