301 redirect all traffic from domain A to the root of domain B Print

  • 301 redirect

If you need to 301 redirect all the traffic from olddomain.com to the index page of newdomain.com then add the following code to your root .htaccess page on olddomain.com

########################
# 301 redirect all traffic from domain A to the root of domain B
# See: https://www.jucra.com/whmcs/knowledgebase/76/
########################
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) https://www.newdomain.com [R=301,L]

Any traffic from any part of olddomain.com will now go to the home page of newdomain.com


Was this answer helpful?

« Back