How to redirect an older website to a newer one

  1. Previous
  2. Next
  3. Recent

    1. Signs 'He' May be Cheating on You
    2. 7 Vows of Hindu Marriage - Know What 'Saat Vachans' Mean
    3. RuPay vs Visa vs Mastercard vs American Express- A Comparison
    4. What is RuPay? Everything You Need to Know About India's Domestic Payment System!
    5. Top 10 Online Portals to Find a High Paying Job in India
    6. Top Indians who Revolutionized the IT Sector in India
    7. 8 Initiatives by Narendra Modi that Could Change the Future of the Nation
    8. 8 Work-from-home Jobs for Housewives, Students, and Part timers
    9. Complete Company Registration Process in India - Explained
    10. Change Name in India in 5 Steps - Filing Affidavit, Newspaper Ad & Gazette Notification

You own a website, some days later you started an another one and now you want to redirect the older website to a newer one without getting in trouble with the search engines.

If this is the case then you desperately want to do either one of these two things- homepage redirection or complete redirection.

In both, we’ll be carrying out 301 redirection, one by adding a simple php code while other is by re-configuring the web server file. It’s easy, don’t worry!

Redirecting website homepage to another

301 redirection means you’re moving to a new domain(new website) permanently, its a search engine friendly way of redirecting a website without losing any pagerank or getting in trouble with search engines.

Here is the simplest way of doing 301 redirection of a website to another,

<?php
Header("Location: www.cyberpassion.com");
?>

Place this code in the index.php page of the website you want to redirect. If the above written code is placed on the homepage of my website(yourravi.com) then visitors would be automatically redirected to cyberpassion.com.

Redirect all older urls to newer ones

You might want to redirect all older urls to newer ones, this can be easily done by a few modification in the .htdocs file of the web server. You’ll find .htdocs file in the root directory i.e directory where index file is present.

Here is the code,

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

Add the code to the .htdocs file replacing cyberpassion.com to anything of your choice and save it. From now onwards, when someone visits url, directory or any other page of your older website then he’ll be automatically redirected to the respective url on a newer website.

Initially, this might appear a bit confusing but once you do this, it would appear a lot easy task.

blog comments powered by Disqus