i have a old domain which i like to transfer on new domain i read some where that it can be possible by using .httaccess easily. is that any way to redirect 301 through .httacces file. if anyone know how please provide some info. thanks
Follow the simple steps to redirect using 301 through .httaccess:
- You might also consider putting in a noindex, nofollow robots.txt file on this new domain until you've got the redirect set up. This will insure that Google and other search engines don't index the second domain and pe• Place all your content on the new domain using the same directory structure and file names as the old domain. In order for this 301 redirect to work, the domains need to be identical in file structure.nalize you for duplicate content. But if you don't have a lot of content, or can get all the content copied over in a day or so, this isn't as important.
- On your old domain website, open up the .htaccess file in your root directory with a text editor. If you don't have a file called .htaccess, create one. This file may be hidden in your directory list.
- Add the code to the .htaccess file at the top: redirect 301 / http://www.newdomain.com/
- Change the URL http://www.newdomain.com/ to the new domain name you're redirecting to.
- Save the file to the root of your old website.
- Test that the old domain pages now point to the new domain.
Edited by pritaeas: Fixed bullets.