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

  • Amazing Search Experiments and New SERP Features In Google Land (2022 Edition)
  • Analysis of Google’s March 2022 Product Reviews Update (PRU) – Findings and observations from the affiliate front lines
  • How NewsGuard’s nutritional labels can help publishers avoid manual actions for medical content violations (Google News and Discover)
  • What Discover’s “More Recommendations”, Journeys in Chrome, and MUM mean for the future of Google Search
  • How to extend a multi-site indexing monitoring system to compare Google-selected and user-selected canonical urls (via the URL Inspection API and Analytics Edge)
  • Favi-gone: 5 Reasons Why Your Favicon Disappeared From The Google Search Results [Case Studies]
  • Google’s Broad Core Updates And The Difference Between Relevancy Adjustments, Intent Shifts, And Overall Site Quality Problems
  • Google’s December 2021 Product Reviews Update – Analysis and Findings Based On An Extended And Volatile Holiday Rollout
  • The Link Authority Gap – How To Compare The Most Authoritative Links Between Websites Using Majestic Solo Links, Semrush Backlink Gap, and ahrefs Link Intersect
  • How to identify ranking gaps in Google’s People Also Ask (PAA) SERP feature using Semrush

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 © 2022 G-Squared Interactive LLC. All Rights Reserved. | Privacy Policy

We are using cookies to give you the best experience on our website.

You can find out more about which cookies we are using or switch them off in settings.

Internet Marketing Driver
Powered by  GDPR Cookie Compliance
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

Strictly Necessary Cookies

Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.

If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.

3rd Party Cookies

This website uses Google Analytics to collect anonymous information such as the number of visitors to the site, and the most popular pages.

Keeping this cookie enabled helps us to improve our website.

This site also uses pixels from Facebook, Twitter, and LinkedIn so we publish content that reaches you on those social networks.

Please enable Strictly Necessary Cookies first so that we can save your preferences!