How to Setup 301 Redirect in classic ASP, ASP.Net and IIS 6.0
Numerous bank and credit union website managers have asked me why their website traffic and sales dropped after launching new, improved websites. Numerous factors have contributed to the declindes, but there is one frequent cause that the designers didn't plan for when building the new sites - page renaming without setting up proper redirects. If you’re planning to redesign your credit union or bank's website, you need to understand what this means, why it happens and how you can avoid the problem.
When search engines like Goole, Yahoo or MSN index a website, they crawl individual pages and store links directly to those pages. Until recently, many designers created sites without search optimization in mind, so they created cryptic page names like prdlggob29.htm that offer little meaning to visitors or search engines. Now that more designers understand the importance of search optimization, they are now changing cryptic files names to more meaningful names, like credit_union_website_hosting.htm; however, often they do not setup a proper 301 redirect to send search engines and visitors to the new page. You will create two problems when you don't setup a proper 301 redirect:
- Search engines will index your old page, discover a 404 Page Not Found response, and dump your page from the index
- Visitors will follow the old link and end up with a 404 Page Not Found error
What is a 301 redirect?
A 301 redirect is a notice to a page requestor signalling that the site owner has permanently moved the resource's content - a page, for example - to a new resource. For more in-depth explanations, visit the Wikipedia HTTP Status Codes page and W3 Protocols explanation page.
Setting up 301 redirects
There are numerous ways to setup 301 redirects, but since I primarily work with ASP, ASP.Net and Microsoft IIS, I'll focus on setting up 301 redirects in those environments.
In classic ASP
Add this code to the top of your old ASP page to setup a 301 redirect:
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", "NEWPAGENAME.EXT"
Setting up 301 redirect in ASP.NET
Add this code to your ASP.NET page that you want to redirect:
private void Page_Load(object sender, System.EventArgs e)
Response.Status = "301 Moved Permanently";
Setting up in IIS 6.0
If you manage your own web server or have console access, then you can setup redirects within IIS. Open your IIS Manager on your Windows server and then select your website in the left navigation pane. On the right side file and folder list pane, right click on the oldfile that you're redirecting and select the Properties menu.
Now on the File tab, select the radio button labeled "A redirection to a URL"
You may type in a full URL, or a relative url like /newpage.asp. Be sure also co check the box labeled "A permanent redirection for this resource."
Each of these methods will send a 301 Permanent Redirection header to the browser or search robot. The header will look similar to this:
HTTP/1.x 301 Moved Permanently
A helpful tool
The Live HTTP Headers plug-in for Firefox is helpful when diagnosing header problems or to confirm that you've setup the correct redirection type. With Live HTTP Headers running while you browse, you can view the complete exchange of headers that occurs between your browser and web server.
Banks and credit unions invest considerable financial and human resources into their websites. Using correct 301 redirection techniques will help protect your investment in search marketing and guarantee that visitors will find the pages that you want them to see.
Other Recent Blog PostsWhy We Like WordPress, but Not for Banks and Credit UnionsAdvice to Banks and Credit Unions for Establishing Website Development BudgetsQuick Fix to Improve Website Speed for Search Engine Optimization Benefits
Find this useful?
Want to receive our monthly tip to make your website easier to use and safer? No spam, just good advice. Signup!