Nét Đẹp Việt Nam

Tiêu đề: Using htaccess redirect traffic from olddomain to newdomain [In trang]

Tác giả: netdepviet    Thời gian: 5-6-2014 10:35 AM
Tiêu đề: Using htaccess redirect traffic from olddomain to newdomain
  You have a new domain name,that domain name seems to be easier to SEO, index. How do you often do to save old domain traffic to new one.

Here is my experience :

A wrong way ( as a newbie I did )

Most of all new webmasters used following htaccess rule to move their website but this is a wrong way. This rule redirects each page on old domain to root of new domain (eg: http://yourolddomain.com/page.html to http://yournewdomain.com/) that affects indexed pages in search engine. This is not a SEO friendly way so I will not recommend it.
  1. <p>RewriteEngine On</p><p>RewriteRule ^(.*)$ http://newdomain.com/ [R=301]</p>
Sao chép mã
The Right SEO way

Another way to redirect is page by page. Following rule redirects each page on old domain to same page on new domain (eg: http://yourolddomain.com/page.html to http://younewdomain.com/page.html).

This is the best way also recommended by Google
  1. <p>RewriteEngine on</p><p>RewriteRule ^(.*)$ http://newdomain.com/$1 [R=301,L]</p>
Sao chép mã
This step is so simple but It keep your website traffic.






Chào mừng ghé thăm Nét Đẹp Việt Nam (https://forum.netdepviet.org/) Powered by Discuz! X3.2