Permanent 301 redirect from http:// to http://www

Replace "" with your actual domain, and name the file as global.asax


<%@ Application Language="VB" %>
<%@ Import Namespace="System.Diagnostics" %>

<script Language="VB" RunAt="server">

Protected Sub Application_BeginRequest(ByVal sender As Object, ByVal e As System.EventArgs)
Dim requestedDomain As String = HttpContext.Current.Request.Url.ToString().ToLower()

If InStr(requestedDomain, "") Then

requestedDomain = requestedDomain.Replace("", "")

Response.Status = "301 Moved Permanently"
Response.AddHeader("Location", requestedDomain)

End If

Catch ex As Exception
Response.Write("Error in Global.asax :" & ex.Message)
End Try
End Sub