Hướng dẫn chuyển đổi tên miền cũ sang tên miền mới mà không mất vị trí từ khóa
Các bước thực hiện như sau:
Bước 1. Trỏ domain phải giống nhau
Ví dụ:
http://domainold.com
A 192.185.xx.xx
@ 192.185.xx.xx
* 192.185.xx.xx
Tương tự cho:
http://newdomain.com
A 192.185.xx.xx
@ 192.185.xx.xx
* 192.185.xx.xx
Bước 2. Add domain trong hosting
Tạo hosting mới cho domain http://newdomain.com, up toàn bộ dữ liệu từ domain cũ sang domain mới này. (xem như dữ liệu domainold.com sẽ không còn)
Sau đó add domain http://domainold.com thành alias domain trong hosting http://newdomain.com
Bước 3. Sử dụng .htaccess redirect nếu là php và web.config nếu là aspx
Đối với php:
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*)http://newdomain.com/$1 [R=301,L]
Đối với aspx:
<rewrite>
<rules>
<rule name="oldsite.com to newsite.com" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{HTTP_HOST}" pattern="^oldsite\.com$" />
</conditions>
<action type="Redirect" url="http://newsite.com/{R:1}" redirectType="Permanent" />
</rule>
<rule name="www.oldsite.com to newsite.com" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{HTTP_HOST}" pattern="www.oldsite.com" />
</conditions>
<action type="Redirect" url="http://newsite.com/{R:1}" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
@: bước này cẩn trọng nhất, backup file htaccess hoặc web.config cũ lại trước khi làm. Nếu có vấn đề xảy ra thì backup file cũ lại ngay.
Bước 4. (Bước này làm sau khi nhận thấy bước 3 hoàn tất)
Sử dụng Google webmaster Tool khai báo với Google việc chuyển đổi http://domainold.com sang http://newdomain.com
Bước 5. Kiểm tra lại sitemap.xml, robots.txt, Kiểm tra lại việc redirect đã hoàn thành chưa?
Rủi ro:
- Khả năng mất khỏi vị trí trong vòng 24h.
- Khả năng rớt top 10 là 20%
- Domain cũ bị mất, không có quyền quản trị
Chúc các bạn may mắn.