How To Redirect Old Domain To New Domain Name Via Htaccess Redirect

How To Redirect Old Domain To New Domain Name Via Htaccess Redirect

If you are a blogger then this post might be the one you were looking for because here in this blog post I am going to tell you how you can redirect all your old site data to a new site with different domain name via Htaccess Redirect procedure. I have seen thousands of users struggling to successfully redirect their site content from old domain name to a new domain name and even most of the beginners who lack information about background site structure details (like me at one stage) often fear to perform the redirection procedure but from now you won’t need to fear anymore because I have mentioned a very safe method to redirect old domain to New domain name using htaccess 301 Redirect.

You might have done some link redirecting using 301 Redirect for some broken links and you can use the same procedure for redirecting the site from old domain to new domain but don’t you think that will be very hectic to do as you have to do it manually for each and every site link and can prove to be a real nightmare for you if your site has thousands of links therefore I am here to help you and provide you with a simple htaccess and mod_rewrite rule to redirect an entire website with just a few lines of code.

What Are The Benefits Of Such 301 Redirect ?

It ensures that all the traffic human visitors and search engines alike are automatically and seamlessly pointed to the new domain without affecting your old visitors and search engine rankings if all the procedure goes well.Follow below tutorial to learn how to redirect old domain to new domain.

Assumptions :

We are assuming that your old site is hosted on a web apache server and you haven’t made any changes to your site structure where you have just relocated your old site content in its current state to another server and are now wishing to point it to a new domain name.

How To Redirect Old Domain To New Domain ? – Follow The Below Tutorial

As I discussed above here you need to do it via htaccess means you have to manually edit your htaccess file present in your old server in root directory and if there is no htaccess file you need to create it manually.

Create a .htaccess file in your old server root directory if it doesn’t exist.

Add the following code to your .htaccess file

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^olddomain\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.olddomain\.com$
RewriteRule (.*)$ http://www.newdomain.com/$1 [R=301,L]
</IfModule>

Note – Here Replace olddomain name with your current old domain name and replace the newdomain name to the one which you wish to redirect your site content.

Important : Disclaimer

Don’t try to make changes to your site structure at the same time when you are moving from one domain to another because it will adversely affect all your SEO So please perform the procedure carefully and we will not be responsible for any harm that comes to your website after following the above given procedure therefore TRY AT YOUR OWN RISK

Be the first to comment

Leave a Reply

Your email address will not be published.


*