You are here:
ColdFusion - a middleware web server technology from Adobe ColdFusion - a middleware web server technology from Adobe

ColdFusion 301 Redirect

If you are currently restructuring your website to become more "search engine friendly" here is a nice piece of code using ColdFusion, that will also let Google and other search engines know that you have moved your content to a new location and to update their links.

Instead of having 404 errors or broken links to your site, make sure you issue the search engines with a 301 status header (moved permanently) along with the new location of the content. An example would be as follows:

<cfheader statuscode=”301″ statustext=”Moved permanently” />
<cfheader name=”location” value=”http://www.mysite.com/new-location-for-content/” />

This way the search engines know your content has moved and begin changing their links to your site in their search results. Not a difficult technique but one that is often forgotten and can cost valuable SEO points!