❤️ AZDIGI has officially updated to a new blog system. However, some posts may have incorrect or mismatched images. Please click the Report article button at the bottom of the post so AZDIGI can update as quickly as possible. Thank you!

In some cases, you will need to the redirection of the old domain name to the new domain name. In this tutorial, AZDIGI will show you how to redirect domains via .htaccess file on the cPanel hosting.

Step 1: Log in to hosting/VPS and go to the root directory of that domain

Because the .htaccess file is a hidden file, you need to Show Hidden Files.

Step 2: Add the following code to the .htaccess file

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://nhập-vào-tên-miền-của-bạn/$1 [R=301,L]

Note: Replace domain-moi.com with the domain you need to redirect to.

Share:
This article has been reviewed by AZDIGI Team

About the author

Thạch Phạm

Thạch Phạm

Đồng sáng lập và Giám đốc điều hành của AZDIGI. Có hơn 15 năm kinh nghiệm trong phổ biến kiến thức liên quan đến WordPress tại thachpham.com, phát triển website và phát triển hệ thống.

10+ years serving 80,000+ customers

Start your web project with AZDIGI