Site-Reference latest featured article titled “Manual Redirection: The Best Safe Bet For Redirection In HTML” is reprinted here. [Article Reprint]


Site-Reference newsletter article by Professor M M Kenawi is reprinted here.

Manual Redirection: The Best Safe Bet For Redirection In HTML

by Professor M M Kenawi

Redesigning website pages may pose some problems if these pages have high search engine rankings that one doesn’t want to lose. In such cases you have to redirect your website traffic so that your original URL is retained. Among many methods, if you have a dynamically driven website (server side), you can implement one of the classical scripts, depending on which scripting language you use. There are scripts in ASP-VB, ColdFusion, PHP, CGI/Perl,Ruby/Ruby on Rails, and Java. However, redirection can be hazardous, if care is not taken in choosing the correct method, if your website is in HTML:

Automatic 301 redirect

This HTTP code 301 is interpreted by search engine robots as moved permanently. In other words, the 301 redirect simply issues the Permanently Moved message in the HTTP header which tells the search engine to only index the target URL.

This 301 code is placed in the root folder of your server by an .htaccess file. The code in this .htaccess file is
redirect 301 /old/old.htm (or html) new/new.htm (or html)

Note that:
1. To create an .htaccess file, open notepad (or other text editor), name and save the file as .htaccess (there is no extension).
2. The first old in the statement must not be altered.
3. The second old of the statement is replaced by your URL which is to be redirected, but:
4. Do not add http://www to that URL.
5. The first new in the statement is your new URL and includes http://www.
6. The second new in the statement must not be altered.
7. You must leave a single space between redirect 301 and /old/old.htm (or html) and new/new.htm (or html).

The .htaccess file is a very powerful tool, but can cause problems on a site if not implemented correctly. Test it by typing in your browser the old address to the page you have changed. You should be immediately taken to the new location. Because of the problems that may occur, if an error is done in preparing the .htaccess file, always save a backup copy of any existing .htaccess file before attempting any changes.

The META tag (Automatic Meta Redirect)

To implement this alternative method (file side) put the following META tag in the head of your document:

<meta http-equiv=refresh content=10;
url=http://www.mynewsite.com/
>
(Where http://mynewsite.com/ is your new target URL).

Content informs the browser of the period to wait before execution of the redirection. The (=10;) tells the browser to wait 10 seconds before transfer. This [i]wait duration is not a fixed compulsory period, you may choose that the wait be for as long you would like. You may even choose it to be (=0;), if you wish to give a smoother transition to the redirection.

With a meta redirect the page with the redirect issues a [i]200 OK status and then the browser moves over to the new URL, With a 200 OK on both pages. The search engine then indexes both the start page and the target page: and that is a known spam method. This spam method consists of setting up numerous domains full of keywords for the search engines to index. Then the META redirect takes the visitor after 0 or more seconds to the intended site. Therefore using this method may end up by getting you penalized, although your intentions were not mean. The search engine robots, however, can’t ascertain that; so you get penalized for spam and you may not be able to get your site listed again!

Manual Redirection – The Best Safe Bet Using The 301 Redirect:

Use the following script for the body of your HTML page:

<body text=#000000 bgcolor=#FFFFFF link=#0000EF>
<script>
protected void Page_Load(object sender, EventArgs e)
{
Response.Status = 301 Moved Permanently ;
Response.AddHeader( Location ,http://www.geocities.com/mmmkenawi/kenawi-toolbar-1.html );
}
</script>
<p>Redirecting to: <a href=http://www.geocities.com/mmmkenawi/kenawi-toolbar-1.html>http://www.geocities.com/mmmkenawi/kenawi-toolbar-1.html</a>
<div align=left>Click the URL above to complete the redirection.</div>
</body>
The above script is redirecting the browser from the old URL (not to be included in the script) to the target URL which here is http://www.geocities.com/mmmkenawi/kenawi-toolbar-1.html (Replace by your desired URL). 

All the visitor has to do then is to click on the link of the target URL, nothing more than a waste of a second of time! But, for you, staying away from a possible lot of trouble.

About the Author

M.M. Kenawi is Professor of Surgery at Cairo University (Egypt) and the Kasr El Aini Hospitals (Cairo)Kasr El Aini Hospitals (Cairo). He has a great interest in Information Technology and is Webmaster of his site on Continuing Surgical Educationamong other things. He has a search toolbar in his name. He offers several ebooks, of which he is the author, for free download from his website. The ebooks are also marketed on the internet.

These and many more Internet Marketing article, news and resources can be found at www.site-reference.com

Related IMNewswatch Post

Read Site-Reference Latest Newsletter

*IMNewswatch would like to thank Site-Reference for granting permission to reprint the latest articles.

 

 

 

 

Sharing is caring