Redirect a Website in ColdFusion – Add www. or Move to New Domain

ColdFusion, BabyRedirecting a website in ColdFusion (.CFM)

I have been working on a ColdFusion website, and I wanted to find a way to require ‘www.’ in the URL (to consolidate all pages on www. for SEO). I normally work with PHP and Apache servers, so I’m used to .htaccess. I knew there had to be a way.

Here’s a simple method of redirecting a whole website in ColdFusion:

<!-- If the site isn't www... -->
<cfif (CGI.SERVER_NAME NEQ "www.example.com")>
<!-- Save the URL (and $_GET variables too) as the string 'strUrl' -->
<cfset strUrl = CGI.script_name & "?" & CGI.query_string />
<!-- Use 301 for SEO-friendly redirects -->
<cfheader statuscode="301" statustext="Moved permanently">
<!-- Redirect to new website (this case, added www.) with strUrl added on -->
<cfheader name="Location" value="http://www.example.com#strUrl#">
</cfif>

Continue reading “Redirect a Website in ColdFusion – Add www. or Move to New Domain”

SEO implications for updating your website

SEO Updates cause white knuckles!

Will a website redesign hurt my rank?

When I am working with a client that already has a website, one of the first questions I am asked is “How will redesigning my website affect my rank?” Here’s what to expect when launching your new website:

Your website will take a hit in the SERPs for 20-30 days

SEO results chart for a redesigned website
After updating a website, you can expect ~25 days of your ranking going down. I call it the "white knuckle month," but I've noticed the website always ranks better once the period is over.

Without fail, I’ve found that when I launch a new website, move a website to a new domain, redesign or make significant structural changes to a site, the website will drop in rank for 3-4 weeks. Continue reading “SEO implications for updating your website”