How to properly redirect one domain to another

Post Reply
User avatar
isscbta
Posts: 39
Joined: Mon Jul 19, 2021 1:41 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:

Code: Select all

RewriteEngine On
RewriteBase /
RewriteRule (.*) https://website.com/$1 [R=301]

Tags:
Post Reply