IRT Logo

How to apply redirect and de-robot code

If you use the Web much you've seen the ubiquitous: "404 - Not Found," typically when linking from a search results page or Web page. It means "It ain't there anymore, if it ever was." Changing locations or URLs is pretty common in Web development. When moving pages or changing the URL, you should make sure that users who visit the obsolete URL end up at the page they want and you have.

The most effective way to do this is to leave the old page in place and add a redirect meta tag in between the <head> and </head> tags. Here's code you can copy:

View Code and replace the entire HTML contents of each file with the meta tag. Change the text "xxxxURLgoesHere" to the URL of the file you want to redirect to. This can be relative or absolute.

Your page(s) may also be indexed in Stanford Google and other search engines. To test for this, used the Advanced Search page and paste the page's URL in the "Domains" field. To remove a page from the index, you should apply another meta tag to de-robot the page:

You can copy and paste each of these chunks of code into your pages individually, and redirect to specific new locations, or do a Dreamweaver Find and Replace operation to find

</head>

and replace it with

"<meta http-equiv="Refresh" content="0; URL=xxxxURLgoesHere">
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
</head>

to redirect all pages to the top of the new site.