Forum Moderators: phranque
Made a brand new site (new URL)
The previous business webmaster had done a redirect that sends old URL users to the new URL
To my surprise when visited by users coming through the old URL I just figured that the browser was showing the old URL although it displays my new site
How may (if possible) I get the address to be shown as the new URL since it shows the new site?
it's important for the old URL account for about 30% of total visits.
I wish the new address to be used and will cancel the other one within a year ot two.
thanks
Regards
<script type="text/javascript"><!--
var U = 'http:\/\/www.new-domain.com\/'
if (window.location.href != U) window.location.href = U;
//--></script> Just put it in the <head> section, it will do the job instantly.
In addition to this you should make the redirect a "301 redirect" using the ".htaccess" file. There's a lot of threads on this subject.
A 301 redirect will tell the visiting browser and the Search Engines that the old URL is no longer valid and the new one should be used in stead. Here's an example of what you could write in the .htaccess file of the old domain (it must be done on the old domain)
RewriteEngine on
RewriteRule (.*) http://www.new-domain.com/ [R=301] /claus