Working for a high end Search Engine Optmisation (SEO) and Melbourne Web Design company has taught me many useful things that I need to take into consideration when developing an entirely new web site or modifying an existing one.
In the past when I had deleted a page on a website for one reason or another, I deleted it and that was it. I had no thoughts about what search engines have indexed it, what external sites may have been linking to it or even the overall power and relevancy of the page itself.
These days as soon as one page has been deleted or moved, I ALWAYS perform a 301 redirect to the new URL, a related URL or back to the homepage. This ensures any value the page had is not entirely wasted and may be transferred over.
To perform the redirects I use a .htaccess file with the following very simple code:
Redirect 301 /oldurl http://www.newurl.com.au
301 redirects using htacess can be very powerful. If I have moved an entire 200 page web site over to a new domain using the exact same structure and I plan to transfer all existing search engine rankings across, my best bet is to perform 301 redirects for each page.
Obviously, we don’t want to create 200 redirects manually so this can be easily avoided using the following.
RewriteEngine on
redirectMatch 301 ^/(.*)$ http://www.newurl.com.au/$1
This code would sit in the htaccess file of the OLD domain name. If I had this htaccess on my current URL (web-design-melbourne.net), any URL would be redirected to newurl.com.au. For example:
http://www.web-design-melbourne.net/testurl.html
–> would become –>
http://www.newurl.com.au/testurl.html
This is a powerful 301 redirect script using htaccess and I have used it without error countless times.