Best way to redirect a website

So I am about to redirect a complete website to a new domain. What would be the best way to redirect all those pages without loosing the ranking and traffic achieved from the old website?
With the 301 redirect does the new domain need to be hosted at the same place as the old website? Do I write the code on each page or is there a way to redirect whole website?

All help appreciated!

Cheers,

If you’re simply redirecting page1 on domain1 to page1 on domain2 (i.e. keeping the URL structure the same), the best way is to use a .htaccess.

Create a file called .htaccess then in something like notepad add this.


Options +FollowSymLinks
RewriteEngine On
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L] 

Upload that to the root of the old domain & it should work.

you dont need seperate hosting.
from your current website detect the requested url, then make 301 redirect based on the requested page.
if you are on a linux server you can easily use .htaccess.
for windows server you can create httpmodule for this.

Google has a specific help page for this very topic:

I suggest you to do the permanent redirecting for your site. It only transfers your entire website with full SEO strength. You can refer this site practicle Ecommerce which explains it very well.

Yes, You use the 301 redirection. I think it is not necessary both website have been uploaded at same place.

thanks for the feedback guys, the google link was helpful! The thing Is will not be able to keep the same URL structure…is there any negative consequences to that and if so how can I avoid them?

Cheers,

What you should do is write an individual redirect for each old page to its new URL (or the ‘best fit’ page if there isn’t an exact match) - that ensures that people following old links from other sites or who have bookmarked pages will still get to the content they want, and that search engines will much more quickly find their way around your site, transferring the rankings for each old page to the relevant new one.

If you don’t do that, and either redirect all old pages to the new homepage, or just leave them giving 404 errors, you’re going to end up with a lot of unhappy potential customers who give up in disgust, as well as search engines that have to learn their way around your site from scratch, which means you will take a major hit in the rankings.

I have a question along the same lines as this post…so I’m planning on also moving my site and I’m planning on writing the 301 redirects for each old page to the new page. I was also planning on putting up the old pages on the old URL with links to all the new pages. Is this necessary at first until everything gets redirected? How long does it take before all the 301 redirects take effect? Will anyone still see my old pages on the old URL or as soon as someone clicks on an old URL link it will go directly to the new URL page?

Redirects are instant. Both visitors and search engines see the new pages straight away.

Ok great. Thank you.

thanks for feedback Stevie helpful as always!

So I am having some problems with actual redirection the new site is made with wordpress and the old site is made are html files expect the blog that is wordpress. Everytime i try to enter a redirect code in the htaccess file it seems to fail anyone who please could lead me towards the right direction with the redirection code.

cheers,

I have tried several different redirects on the htaccess file but it wont seem to register the redirection at all…while some codes give me this message:

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

OK, do you want to show us what you’ve put in your .htaccess file so far, and we can see what might be the matter.

The .htaccess part of this discussion has been split of to a new the thread in the Apache configuration forum: Redirect to new domain.

Redirect process being done in two ways. First step is 301 and second one is 302.But 301 is the best one because it redirect the page for permanent and 302 is just if you want temporary redirection.