Let's say you're rebranding your website with a new domain name.  How do you update all of those search engine links without losing juice


One simple method is to alias the old domain to the new domain, then redirect the old domain to the new domain in htaccess:


<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>


The $ at the end of olddomain.com captures individual pages. 


R=301 tells search engines this is a permanent move so they will update the search engine listing.