I am having a site with two domains pointing to the same site.
Lets say domain1.com & domain2.com
I want to do a permanent redirect of the domain1.com to domain2.com, so that anyone who visit the site from domain1 even if Google crawler, it should be redirected to the domain2. I want to do this from htaccess. Is it possible?
Yes, it’s possible.
put in your .htaccess