Internet Marketing Driver

  • GSQi Home
  • About Glenn Gabe
  • SEO Services
    • Algorithm Update Recovery
    • Technical SEO Audits
    • Website Redesigns and Site Migrations
    • SEO Training
  • Blog
    • Web Stories
  • Contact GSQi

301 Redirect HTML Files Without Using ISAPI Rewrite

January 8, 2008 By Glenn Gabe

Share
Tweet
Share
Email

Using 301 Redirects When All Else FailsWhen you run a website, there are times that you’ll need to redirect older webpages to newer webpages or you might want to redirect multiple domain names to a single domain name. There are two key ways to accomplish this task, issuing a 301 redirect or a 302 redirect. What you might not know is that a 301 redirect is search engine friendly and a 302 redirect is not. 301’s will safely tell the search engines that one page has been permanently moved to a new location, while 302’s tell the search engines that it’s a temporary redirect (which can cause problems down the line.) This shouldn’t be news for anyone working in the search industry, but might be news for website owners outside of the industry. My post today isn’t about what 301’s and 302’s are, but it’s about a unique challenge I ran into recently with one of my clients. We needed to 301 redirect several HTML files to new pages on the website without using the standard methods of issuing a 301 redirect. Also, the website was running on a shared server, which was an added barrier. By writing this post, my hope is that I can help some of you who might run into the same situation. More on this soon. Let’s start with a quick review of redirects.

Let’s Define 301 and 302 redirects:
A 301 redirect is a permanent redirect and tells the search engines that the old webpage has been permanently moved to a new location. It basically tells Google and the other engines that you have permanently moved one page from HERE to THERE. If you need to redirect a file on your website, then you should always use a 301 redirect.

A 302 redirect is a temporary redirect, and is not search engine friendly. It basically tells Google and the other engines that the file in question has temporarily moved from HERE to THERE. There have been vulnerabilities in the past with using 302 redirects, which is a reason that 302’s aren’t trusted. If you need to redirect one page to another on your website, then don’t use a 302. Always use a 301 redirect when possible.

The 301 Challenge
Back to the redirect challenge that I recently faced. Again, my hope is that the solution can help some of you who might run into the same situation. One of my clients has a website that’s running on a windows server and contains a combination of HTML, ASP, and ASP.net files. We needed to redirect several older HTML pages to new ASP.net pages, which at first glance would be relatively simple to do. If you are on a windows server, I highly recommend using ISAPI rewrite to issue 301 redirects. This is similar to using an .htaccess file on a linux or unix server. You can issue one line commands using a text file named httpd.ini that sits at the root level of your website. It easily enables you to issue 301 redirects, rewrite URLs, etc. It’s a great utility to have installed…

The Shared Server Problem
Here was the problem. We couldn’t use ISAPI rewrite. The website was running on a shared server and the web hosting company would not install ISAPI rewrite on the server. Some hosting companies will and others won’t…this specific hosting provider wouldn’t after several requests to do so.

Issue the 301 Via ASP.net Code
So, my next move was to issue the 301 redirects via code (either through ASP or ASP.net). There was also a problem with using this technique. The files we needed to redirect were HTML files and not ASP or ASP.net files, so I couldn’t add the necessary VB or VBScript code to the pages that needed to be redirected. Moving on…

Run HTML Files Through ASP.net
My third idea was to run all HTML files on the website through ASP.net, which would enable me to add ASP.net code to each of the HTML files. Basically, when an HTML file is requested, it would run through the ASP.net engine. Then I could issue the 301 redirect via ASP.net code instead of using ISAPI rewrite. Cool, right? The hosting provider made the change on the server (running HTML files through ASP.net), but to our dismay, some of the HTML files on the site were not rendering properly. So, we reverted back to the original setup (where HTML files were not run through ASP.net). Again, moving on…

The Fourth Time is a Charm…
My fourth idea finally worked. The hosting provider basically said we were out of luck, but I wasn’t ready to give up so fast… I knew that Classic ASP is still supported on windows server, even when running ASP.net. Classic ASP was the original version of Microsoft’s server side scripting framework. The next version of the framework was ASP.net, which has also gone through its own upgrades over the years. So, I posed the question…couldn’t we try and run HTML files through Classic ASP instead of ASP.net? My client’s hosting provider made the change and bingo, it worked like a charm. We can now issue search engine friendly 301 redirects on HTML pages. Just to clarify, this meant that I could add Classic ASP code to any HTML file running on the website. For our purposes, I could issue a 301 redirect via Classic ASP code, the HTML file would be run through the Classic ASP engine, and everyone would be happy. :)

The Added Benefits of Using This Solution:
The obvious benefit is that we can now use 301 redirects with any HTML file on the website, when needed. The added benefit is that we can now also use Classic ASP code within any HTML file running on the website. Typically, HTML files can only contain HTML code (no server side functionality.) But with this solution, I can make database calls, provide dynamic content, use session variables, and any other Classic ASP functionality available. It’s a flexible solution, to say the least.

In closing, please remember the following items when you need to redirect HTML files on your website:

1. If you need to redirect a webpage or domain name, use a 301 redirect.

2. Don’t use 302 redirects. If you do, use them at your own peril. {cue mad scientist laughter}.

3. If your website is hosted on a windows server, use ISAPI rewrite to issue your 301 redirects. It’s a great utility.

4. If you can’t use ISAPI rewrite and you are in a shared environment, try and issue the redirect via ASP or ASP.net code. If you are trying to redirect HTML files, you’ll need to skip to #5 below.

5. If you can’t add ASP.net or Classic ASP code because you are working with HTML files, then try running your HTML files through the ASP.net or Classic ASP engine. Then you’ll be able to add the 301 redirect code to your HTML files.

Happy Redirecting!

GG

Share
Tweet
Share
Email

Filed Under: SEO, website-redesign

Connect with Glenn Gabe today!

RSS Latest Blog Posts

  • How to compare hourly sessions in Google Analytics 4 to track the impact from major Google algorithm updates (like broad core updates)
  • It’s all in the (site) name: 9 tips for troubleshooting why your site name isn’t showing up properly in the Google search results
  • Google Explore – The sneaky mobile content feed that’s displacing rankings in mobile search and could be eating clicks and impressions
  • Bing Chat in the Edge Sidebar – An AI companion that can summarize articles, provide additional information, and even generate new content as you browse the web
  • The Google “Code Red” That Triggered Thousands of “Code Reds” at Publishers: Bard, Bing Chat, And The Potential Impact of AI in the Search Results
  • Continuous Scroll And The GSC Void: Did The Launch Of Continuous Scroll In Google’s Desktop Search Results Impact Impressions And Clicks? [Study]
  • How to analyze the impact of continuous scroll in Google’s desktop search results using Analytics Edge and the GSC API
  • Percent Human: A list of tools for detecting lower-quality AI content
  • True Destination – Demystifying the confusing, but often accurate, true destination url for redirects in Google Search Console’s coverage reporting
  • Google’s September 2022 Broad Core Product Reviews Update (BCPRU) – The complexity and confusion when major algorithm updates overlap

Web Stories

  • Google's December 2021 Product Reviews Update - Key Findings
  • Google's April 2021 Product Reviews Update - Key Points For Site Owners and Affiliate Marketers
  • Google's New Page Experience Signal
  • Google's Disqus Indexing Bug
  • Learn more about Web Stories developed by Glenn Gabe

Archives

  • July 2012
  • March 2012
  • February 2012
  • January 2012
  • December 2011
  • November 2011
  • October 2011
  • September 2011
  • August 2011
  • July 2011
  • June 2011
  • May 2011
  • April 2011
  • March 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010
  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • June 2009
  • May 2009
  • April 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • December 2007
  • November 2007
  • October 2007
  • September 2007
  • August 2007
  • July 2007
  • June 2007
  • May 2007
  • April 2007
  • November 2006
  • October 2006
  • GSQi Home
  • About Glenn Gabe
  • SEO Services
  • Blog
  • Contact GSQi
Copyright © 2023 G-Squared Interactive LLC. All Rights Reserved. | Privacy Policy
This website uses cookies to improve your experience. Are you ok with this? You can always opt-out at a later time if you wish. Cookie settings ACCEPT
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience. You can read our privacy policy for more information.
Cookie Consent
Save & Accept