home ¦ services ¦ company ¦ contact us ¦ sitemap

301 Redirect on a Windows Server

If you are not using a Unix or Apache server, you can still do a 301 redirect, if you are using .asp pages. Here's what you do:

Place the following code above your <html> tag or <!DOCTYPE>, if you have one:

<%@ Language=VBScript %>
<%
response.status="301 moved permanently"
Response.AddHeader "Location", "http://www.domain.com/file-location.html"
%>

If you are using .ASP.NET pages, the code should look like:

<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
response.status = "301 moved permanently";
Response.AddHeader("Location","http://www.domain.com/file-location.html");
}
</script>

The URL after "Location" should be the exact location to which you want the page to redirect.

Redirect in ColdFusion

<.cfheader statuscode="301" statustext="Moved permanently">
<.cfheader name="Location" value="http://www.domain.com">


» Web Design Quote » Web Marketing Quote
» Prices & Packages » Payment Options
» Knowledge Base » Web Directory
Web Design & Search Engine Marketing Company
Our focus is on creativity, craftsmanship and building strong customer relationships. We value the relationships we forge with clients providing unmatched courtesy, responsiveness, and quality during each project.
Helpful Web Design Resources
Here’s a bunch of our favorite web design resources that we use everyday. The left side resources have been a huge help to us and SprightlyMedia highly recommend them. Whether you’re already a professional web developer or you’re just getting your feet wet there’s plenty of information that can help you.

What resources have you found helpful? We're always looking to add to add resources so please share your favorites with us.
Request A Web Design Quote
Request A Web Marketing Quote