Forum Moderators: coopster

Message Too Old, No Replies

How to redirect pages from current site to new domain

         

hswaseer

2:05 pm on May 25, 2004 (gmt 0)

10+ Year Member



Hi Guys,

I am shifting my current website to a new domain.
Now the problem is that if I change to new domain then
the pages from search engines will be of no use and I will lost the traffic until my new domain comes to search engines.

Is there a way through which i can send the traffic to my new domain from the current site pages which are listed on seach engine. i.e. if someone clicks on the pages in search engine then he will be redirected to that page of my new domain.

Thanks

HS

hughie

2:54 pm on May 25, 2004 (gmt 0)

10+ Year Member



Can't you just keep 2 domain names pointing at the same site untill the search engines are happy with the new name?

If not, you can use a php redirect, not sure the SE's will be overly happy about it but its worth a go.

at the very top of the page, before anything has been sent to the browser (not even an HTML space) put

<?php
header("location:http://www.newdomain.com");
exit;
?>

that should do the job.

ta,
Hughie

ptietze

3:04 pm on May 25, 2004 (gmt 0)

10+ Year Member



You may want to use a 301 (permanent) redirect. See this thread. [webmasterworld.com...]

[edited by: jatar_k at 5:07 pm (utc) on May 25, 2004]
[edit reason] linked it up [/edit]