How to properly redirect one domain to another
Posted: Wed Aug 17, 2022 11:32 am
Let's assume that your primary domain is website.com and that you want to redirect another domain, website2.com to the primary domain
Steps you should take in order to achieve this:
Add website2.com to your myVesta Hosting Panel (if there is already a website2.com domain created then skip creating), then go into web/website2.com/public_html/ folder of this domain and create a .htaccess file with content:
Steps you should take in order to achieve this:
Add website2.com to your myVesta Hosting Panel (if there is already a website2.com domain created then skip creating), then go into web/website2.com/public_html/ folder of this domain and create a .htaccess file with content:
Code: Select all
RewriteEngine On
RewriteBase /
RewriteRule (.*) https://website.com/$1 [R=301]